§
    ­˜ºh�Ì  ã                  ó  — U d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlm	Z	m
Z
mZmZmZmZ d dlmZ d dlZd dlmZmZ d dlmZmZmZ erd dlmZ dd	gZ	 d dlZd
Zn# e $ r dZdZY nw xY w ej!        ¦   «         Z"i Z#de$d<    edd¬¦  «        Z% G d„ d¦  «        Z&d„ Z' G d„ d	ej(        j)        e&¦  «        Z*d„ Z+ej,        d„ ¦   «         Z-ej,        d„ ¦   «         Z.ej,        d„ ¦   «         Z/d„ Z0d„ Z1da2d„ Z3d„ Z4d+d„Z5d„ Z6d,d"„Z7 G d#„ d¦  «        Z8ej9        e8j:        _9        e&j;        j9        e8j;        _9        e&j<        j9        e8j<        _9        ej9        e8j=        _9         G d$„ d%e:¦  «        Z> G d&„ d'e8e>¬(¦  «        Z?d-d*„Z@dS ).é    )ÚannotationsN)ÚAnyÚcastÚOptionalÚTYPE_CHECKINGÚTypeVarÚUnion)ÚSelf)Ú_toÚ_type)Ú_boolÚ_intÚStorage)ÚDeviceLikeTypeÚTypedStorageÚUntypedStorageTFzdict[int, threading.RLock]Ú_share_memory_mapÚTú!Union[_StorageBase, TypedStorage])Úboundc                  ól  ‡ — e Zd ZU ded<   dZded<   dZded<   ded<   d	Zd
ed<   d	Zded<   d„ Zdkd„Z	d„ Z
d„ Zdldmd„Zdnd„Zdkd„Zdkd„Z	 dodpd„Z	 dodnd „Zdodnd!„Zdkd"„Zdkd#„Zdkd$„Zdqd%„Zd&„ Zd'„ Zedrd*„¦   «         Zedrd+„¦   «         Zedsd,„¦   «         Zed	d	d-œdsd.„¦   «         Zed	d/œd0„¦   «         Zedsd1„¦   «         Zedsd2„¦   «         Z dnd3„Z!d4„ Z"dtd5„Z#dnd6„Z$d7„ Z%d8„ Z&d9„ Z'dqd:„Z(edsd;„¦   «         Z)d<„ Z*ed=„ ¦   «         Z+e,d>„ ¦   «         Z-e,d?„ ¦   «         Z.ednd@„¦   «         Z/edndA„¦   «         Z0dB„ Z1dudC„Z2dD„ Z3dE„ Z4dF„ Z5dG„ Z6dH„ Z7ˆ fdI„Z8dJ„ Z9dK„ Z:dL„ Z;dM„ Z<dN„ Z=ddOœdvdQ„Z>dR„ Z?dS„ Z@dT„ ZAdU„ ZBdV„ ZCdW„ ZDdX„ ZEdY„ ZFdZ„ ZGd[„ ZHd\„ ZId]„ ZJd^„ ZKd_„ ZLd`„ ZMda„ ZNdwdxdd„ZOdwdxde„ZPdf„ ZQedgd/œdh„¦   «         ZRdi„ ZSdj„ ZTˆ xZUS )yÚ_StorageBaser   Ú_cdataFr   Ú	is_sparseÚis_sparse_csrztorch.deviceÚdeviceNú_Optional[torch.device]Ú_fake_devicez_Optional[int]Ú_checkpoint_offsetc                ó   — d S ©N© ©ÚselfÚargsÚkwargss      úU/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/torch/storage.pyÚ__init__z_StorageBase.__init__5   s   € Øˆó    Úreturnr   c                ó   — t           ‚r!   ©ÚNotImplementedError©r$   s    r'   Ú__len__z_StorageBase.__len__8   ó   € Ý!Ð!r)   c                ó   — t           ‚r!   r,   ©r$   Úidxs     r'   Ú__getitem__z_StorageBase.__getitem__;   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú__setitem__z_StorageBase.__setitem__>   r0   r)   Úsourcer   Únon_blockingú_Optional[_bool]c                ó   — t           ‚r!   r,   ©r$   r7   r8   s      r'   Úcopy_z_StorageBase.copy_A   r0   r)   r   c                ó   — t           ‚r!   r,   r.   s    r'   Únewz_StorageBase.newD   r0   r)   c                ó   — t           ‚r!   r,   r.   s    r'   Únbytesz_StorageBase.nbytesG   r0   r)   c                ó*   — |                       ¦   «         S r!   )r@   r.   s    r'   Úsizez_StorageBase.sizeJ   s   € Ø�{Š{‰}Œ}Ðr)   Údtypeú_Optional[str]c                ó$   — t          | ||¦  «        S r!   )r   )r$   rC   r8   s      r'   Útypez_StorageBase.typeM   s   € õ �T˜5 ,Ñ/Ô/Ð/r)   c                ó†   — |rt          j        d|¦  «        nt          j        d¦  «        }|                      ||¬¦  «        S )aû  Returns a copy of this object in CUDA memory.

        If this object is already in CUDA memory and on the correct device, then
        no copy is performed and the original object is returned.

        Args:
            device (int): The destination GPU id. Defaults to the current device.
            non_blocking (bool): If ``True`` and the source is in pinned memory,
                the copy will be asynchronous with respect to the host. Otherwise,
                the argument has no effect.
        Úcuda©r   r8   ©Útorchr   Úto©r$   r   r8   Údevice2s       r'   rH   z_StorageBase.cudaR   s?   € ð 39ÐR•%”,˜v vÑ.Ô.Ð.½e¼lÈ6Ñ>RÔ>RˆØ�wŠw˜g°LˆwÑAÔAÐAr)   c                ó†   — |rt          j        d|¦  «        nt          j        d¦  «        }|                      ||¬¦  «        S )aù  Returns a copy of this object in HPU memory.

        If this object is already in HPU memory and on the correct device, then
        no copy is performed and the original object is returned.

        Args:
            device (int): The destination HPU id. Defaults to the current device.
            non_blocking (bool): If ``True`` and the source is in pinned memory,
                the copy will be asynchronous with respect to the host. Otherwise,
                the argument has no effect.
        ÚhpurI   rJ   rM   s       r'   rP   z_StorageBase.hpuc   s?   € ð 28ÐP•%”,˜u fÑ-Ô-Ð-½U¼\È%Ñ=PÔ=PˆØ�wŠw˜g°LˆwÑAÔAÐAr)   c                ó   — t           ‚r!   r,   r.   s    r'   Úelement_sizez_StorageBase.element_sizer   r0   r)   c                ó   — | j         j        S r!   )r   Úindexr.   s    r'   Ú
get_devicez_StorageBase.get_deviceu   s   € ØŒ{Ô Ð r)   c                ó   — t           ‚r!   r,   r.   s    r'   Údata_ptrz_StorageBase.data_ptrx   r0   r)   c                ó   — t           ‚r!   r,   r.   s    r'   Ú	resizablez_StorageBase.resizable{   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú_share_filename_cpu_z!_StorageBase._share_filename_cpu_   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú_share_fd_cpu_z_StorageBase._share_fd_cpu_‚   r0   r)   rB   r
   c                ó   — t           ‚r!   r,   ©ÚclsrB   s     r'   Ú_new_using_filename_cpuz$_StorageBase._new_using_filename_cpu…   ó   € å!Ð!r)   c                ó   — t           ‚r!   r,   r_   s     r'   Ú_new_using_fd_cpuz_StorageBase._new_using_fd_cpu‰   rb   r)   c                ó   — t           ‚r!   r,   ©r`   r%   r&   s      r'   Úfrom_bufferz_StorageBase.from_buffer�   rb   r)   )r   rC   c               ó   — t           ‚r!   r,   )r`   ÚmanagerÚobjrB   r   rC   s         r'   Ú_new_shared_filename_cpuz%_StorageBase._new_shared_filename_cpu‘   s
   € õ "Ð!r)   ©r   c               ó   —  | j         |i |¤ŽS r!   )Ú_release_ipc_counter_cuda©r`   r   r%   r&   s       r'   Ú_release_ipc_counterz!_StorageBase._release_ipc_counter�   s   € à,ˆsÔ,¨dÐ=°fÐ=Ð=Ð=r)   c                ó   — t           ‚r!   r,   rf   s      r'   rn   z&_StorageBase._release_ipc_counter_cuda¡   rb   r)   c                ó   — t           ‚r!   r,   rf   s      r'   Ú_new_with_weak_ptrz_StorageBase._new_with_weak_ptr¥   rb   r)   c                ó   — t           ‚r!   r,   r.   s    r'   Ú_shared_decrefz_StorageBase._shared_decref©   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú_write_filez_StorageBase._write_file¬   r0   r)   c                ó   — t           ‚r!   r,   ©r$   rB   s     r'   Úresize_z_StorageBase.resize_¯   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú	_weak_refz_StorageBase._weak_ref²   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú_set_from_filez_StorageBase._set_from_fileµ   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú
_set_cdataz_StorageBase._set_cdata¸   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú_share_cuda_z_StorageBase._share_cuda_»   r0   r)   c                ó   — t           ‚r!   r,   r.   s    r'   Ú	is_sharedz_StorageBase.is_shared¾   r0   r)   c                ó   — t           ‚r!   r,   rf   s      r'   Ú_new_shared_cudaz_StorageBase._new_shared_cudaÁ   rb   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú_shared_increfz_StorageBase._shared_increfÅ   r0   r)   c                ó   — t           ‚r!   r,   rf   s      r'   Ú_free_weak_refz_StorageBase._free_weak_refÈ   rb   r)   c                ó   — t           ‚r!   r,   r.   s    r'   Úis_cudaz_StorageBase.is_cudaÌ   rb   r)   c                ó   — t           ‚r!   r,   r.   s    r'   Úis_hpuz_StorageBase.is_hpuÐ   rb   r)   c                ó   — t           ‚r!   r,   )r`   ÚfilenameÚsharedr@   s       r'   Ú	from_filez_StorageBase.from_fileÔ   rb   r)   c                ó   — t           ‚r!   r,   rf   s      r'   Ú_expiredz_StorageBase._expiredØ   rb   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú	_byteswapz_StorageBase._byteswapÜ   r0   r)   c                ó   — t           ‚r!   r,   r#   s      r'   Ú_get_filenamez_StorageBase._get_filenameß   r0   r)   c                ó$  ‡ — dt          j        ‰ ¦  «        › d‰ j        › dt          ‰ ¦  «        › d�}‰ j        j        dk    rd|z   S dd                     ˆ fd	„t          ‰                      ¦   «         ¦  «        D ¦   «         ¦  «        z   }|d
z   |z   S )Nú[z(device=ú
) of size ú]Úmetaú...
ú ú
 c              3  óB   •K  — | ]}t          ‰|         ¦  «        V — Œd S r!   ©Ústr©Ú.0Úir$   s     €r'   ú	<genexpr>z(_StorageBase.__repr__.<locals>.<genexpr>æ   s-   øè è € Ð#MÐ#M°Q¥C¨¨Q¬¡L¤LÐ#MÐ#MÐ#MÐ#MÐ#MÐ#Mr)   ú
)rK   Útypenamer   ÚlenrF   ÚjoinÚrangerB   ©r$   Úinfo_strÚdata_strs   `  r'   Ú__repr__z_StorageBase.__repr__â   s›   ø€ ØX•u”~ dÑ+Ô+ÐXÐX°T´[ÐXÐXÍCÐPTÉIÌIÐXÐXÐXˆØŒ;Ô˜vÒ%Ð%Ø˜XÑ%Ð%Ø˜ŸšÐ#MÐ#MÐ#MÐ#M½%ÀÇ	Â	ÁÄÑ:LÔ:LÐ#MÑ#MÔ#MÑMÔMÑMˆØ˜$‰ Ñ)Ð)r)   c                óx   ‡ — t          ˆ fd„t          ‰                      ¦   «         ¦  «        D ¦   «         ¦  «        S )Nc              3  ó(   •K  — | ]}‰|         V — Œd S r!   r"   r¤   s     €r'   r§   z(_StorageBase.__iter__.<locals>.<genexpr>ê   ó'   øè è € Ð8Ð8 �D˜”GÐ8Ð8Ð8Ð8Ð8Ð8r)   )Úiterr¬   rB   r.   s   `r'   Ú__iter__z_StorageBase.__iter__é   s6   ø€ ÝÐ8Ð8Ð8Ð8¥U¨4¯9ª9©;¬;Ñ%7Ô%7Ð8Ñ8Ô8Ñ8Ô8Ð8r)   c                ó*   — |                       ¦   «         S r!   )Úcloner.   s    r'   Ú__copy__z_StorageBase.__copy__ì   s   € Ø�zŠz‰|Œ|Ðr)   c                óš   — |                      di ¦  «        }| j        |v r|| j                 S |                      ¦   «         }||| j        <   |S )NrK   )Ú
setdefaultr   r·   )r$   ÚmemoÚnew_storages      r'   Ú__deepcopy__z_StorageBase.__deepcopy__ï   sN   € Ø�Š˜w¨Ñ+Ô+ˆØŒ;˜$ÐÐØ˜œÔ$Ð$Ø—j’j‘l”lˆØ'ˆˆTŒ[ÑØÐr)   c                óŽ   — t          j        ¦   «         }t          j        | |d¬¦  «         t          |                     ¦   «         ffS ©NF)Ú_use_new_zipfile_serialization©ÚioÚBytesIOrK   ÚsaveÚ_load_from_bytesÚgetvalue©r$   Úbs     r'   Ú
__reduce__z_StorageBase.__reduce__÷   ó9   € ÝŒJ‰LŒLˆÝŒ
�4˜¸5ÐAÑAÔAÐAÝ  1§:¢:¡<¤< /Ð2Ð2r)   c                ón   •— t          ¦   «                              ¦   «         |                      ¦   «         z   S r!   )ÚsuperÚ
__sizeof__rB   ©r$   Ú	__class__s    €r'   rÍ   z_StorageBase.__sizeof__ü   s&   ø€ Ý‰wŒw×!Ò!Ñ#Ô# d§i¢i¡k¤kÑ1Ð1r)   c                óŠ   —  t          | ¦  «        |                      ¦   «         | j        ¬¦  «                             | ¦  «        S )úReturn a copy of this storage.rl   )rF   r@   r   r<   r.   s    r'   r·   z_StorageBase.cloneÿ   s5   € à�t�D‰zŒz˜$Ÿ+š+™-œ-°´Ð<Ñ<Ô<×BÒBÀ4ÑHÔHÐHr)   c                ó    — t          | ¦  «        S ©z6Return a list containing the elements of this storage.)Úlistr.   s    r'   Útolistz_StorageBase.tolist  s   € å�D‰zŒzÐr)   c                óš   — | j         j        dk    r:t          j        |                      ¦   «         ¦  «                             | d¦  «        S | S )úAReturn a CPU copy of this storage if it's not already on the CPU.ÚcpuF©r   rF   rK   r   rB   r<   r.   s    r'   rØ   z_StorageBase.cpu  s@   € àŒ;Ô˜uÒ$Ð$ÝÔ'¨¯	ª	©¬Ñ4Ô4×:Ò:¸4ÀÑGÔGÐGØˆr)   c                óž   — | j         j        dk    r<t          j        |                      ¦   «         d¬¦  «                             | d¦  «        S | S )zAReturn a MPS copy of this storage if it's not already on the MPS.Úmpsrl   FrÙ   r.   s    r'   rÛ   z_StorageBase.mps  sE   € àŒ;Ô˜uÒ$Ð$ÝÔ'¨¯	ª	©¬¸EÐBÑBÔB×HÒHÈÈuÑUÔUÐUØˆr)   c                óÖ  — t          |t          j        ¦  «        st          dt	          |¦  «        › �¦  «        ‚t          j        g t          j        | j        ¬¦  «                             t          t          | ¦  «        ¦  «                             |¦  «                             ¦   «         }|                     ¦   «         |                      ¦   «         k    r|                     ¦   «         }|S ©Nz*Argument 'dtype' must be torch.dtype, not ©rC   r   )Ú
isinstancerK   rC   Ú	TypeErrorrF   ÚtensorÚuint8r   Úset_r   r   rL   Ú_typed_storagerW   r·   ©r$   rC   Ústorages      r'   r   z_StorageBase._to  s±   € Ý˜%¥¤Ñ-Ô-ð 	XÝÐVÍÈeÉÌÐVÐVÑWÔWÐWåŒL˜¥5¤;°t´{ÐCÑCÔCßŠT•$•w Ñ%Ô%Ñ&Ô&ßŠR�‰YŒYßŠ^ÑÔð	 	ð ×ÒÑÔ §¢¡¤Ò0Ð0Ø—m’m‘o”oˆGØˆr)   ©r8   r   c               ó€   — t          |t          j        ¦  «        st          j        |¦  «        }t          | ||¦  «        S r!   )rß   rK   r   r   )r$   r   r8   s      r'   rL   z_StorageBase.to   s7   € Ý˜&¥%¤,Ñ/Ô/ð 	*Ý”\ &Ñ)Ô)ˆFÝ�4˜ Ñ.Ô.Ð.r)   c                ó@   — |                       t          j        ¦  «        S ©z"Casts this storage to double type.)r   rK   Údoubler.   s    r'   rë   z_StorageBase.double%  ó   € à�xŠx�œÑ%Ô%Ð%r)   c                ó@   — |                       t          j        ¦  «        S ©z!Casts this storage to float type.)r   rK   Úfloatr.   s    r'   rï   z_StorageBase.float)  ó   € à�xŠx�œÑ$Ô$Ð$r)   c                ó@   — |                       t          j        ¦  «        S ©z Casts this storage to half type.)r   rK   Úhalfr.   s    r'   ró   z_StorageBase.half-  ó   € à�xŠx�œ
Ñ#Ô#Ð#r)   c                ó@   — |                       t          j        ¦  «        S ©z Casts this storage to long type.)r   rK   Úlongr.   s    r'   r÷   z_StorageBase.long1  rô   r)   c                ó@   — |                       t          j        ¦  «        S ©zCasts this storage to int type.)r   rK   Úintr.   s    r'   rú   z_StorageBase.int5  s   € à�xŠx�œ	Ñ"Ô"Ð"r)   c                ó@   — |                       t          j        ¦  «        S ©z!Casts this storage to short type.)r   rK   Úshortr.   s    r'   rý   z_StorageBase.short9  rð   r)   c                ó@   — |                       t          j        ¦  «        S ©z Casts this storage to char type.)r   rK   Úint8r.   s    r'   Úcharz_StorageBase.char=  rô   r)   c                ó@   — |                       t          j        ¦  «        S ©z Casts this storage to byte type.)r   rK   râ   r.   s    r'   Úbytez_StorageBase.byteA  rð   r)   c                ó@   — |                       t          j        ¦  «        S ©z Casts this storage to bool type.)r   rK   Úboolr.   s    r'   r  z_StorageBase.boolE  rô   r)   c                ó@   — |                       t          j        ¦  «        S ©z$Casts this storage to bfloat16 type.)r   rK   Úbfloat16r.   s    r'   r
  z_StorageBase.bfloat16I  s   € à�xŠx�œÑ'Ô'Ð'r)   c                ó@   — |                       t          j        ¦  «        S ©z*Casts this storage to complex double type.)r   rK   Úcdoubler.   s    r'   Úcomplex_doublez_StorageBase.complex_doubleM  s   € à�xŠx�œÑ&Ô&Ð&r)   c                ó@   — |                       t          j        ¦  «        S ©z)Casts this storage to complex float type.)r   rK   Úcfloatr.   s    r'   Úcomplex_floatz_StorageBase.complex_floatQ  rì   r)   c                ó@   — |                       t          j        ¦  «        S ©z&Casts this storage to float8_e5m2 type)r   rK   Úfloat8_e5m2r.   s    r'   r  z_StorageBase.float8_e5m2U  s   € à�xŠx�Ô)Ñ*Ô*Ð*r)   c                ó@   — |                       t          j        ¦  «        S ©z(Casts this storage to float8_e4m3fn type)r   rK   Úfloat8_e4m3fnr.   s    r'   r  z_StorageBase.float8_e4m3fnY  s   € à�xŠx�Ô+Ñ,Ô,Ð,r)   c                ó@   — |                       t          j        ¦  «        S ©z*Casts this storage to float8_e5m2fnuz type)r   rK   Úfloat8_e5m2fnuzr.   s    r'   r  z_StorageBase.float8_e5m2fnuz]  ó   € à�xŠx�Ô-Ñ.Ô.Ð.r)   c                ó@   — |                       t          j        ¦  «        S ©z*Casts this storage to float8_e4m3fnuz type)r   rK   Úfloat8_e4m3fnuzr.   s    r'   r  z_StorageBase.float8_e4m3fnuza  r  r)   rH   úUnion[str, torch.device]c                óÀ   — t          j        g t           j        | j        ¬¦  «                             t          t          | ¦  «        ¦  «                             |¦  «        S )a-  Determine whether the CPU storage is already pinned on device.

        Args:
            device (str or torch.device): The device to pin memory on (default: ``'cuda'``).
                This argument is discouraged and subject to deprecated.

        Returns:
            A boolean variable.
        rÞ   )rK   rá   râ   r   rã   r   r   Ú	is_pinned©r$   r   s     r'   r"  z_StorageBase.is_pinnede  sE   € õ ŒL˜¥5¤;°t´{ÐCÑCÔCßŠT•$•w Ñ%Ô%Ñ&Ô&ßŠY�vÑÔð	
r)   c                óR  — | j         j        dk    r%t          d|                      ¦   «         › d�¦  «        ‚t          j        g t          j        | j         ¬¦  «                             t          t          | ¦  «        ¦  «         	                    |¦  «        }| 
                    ¦   «         S )a3  Copy the CPU storage to pinned memory, if it's not already pinned.

        Args:
            device (str or torch.device): The device to pin memory on (default: ``'cuda'``).
                This argument is discouraged and subject to deprecated.

        Returns:
            A pinned CPU storage.
        rØ   zcannot pin 'z' only CPU memory can be pinnedrÞ   )r   rF   rà   rK   rá   râ   rã   r   r   Ú
pin_memoryÚuntyped_storage)r$   r   Úpinned_tensors      r'   r%  z_StorageBase.pin_memoryu  s�   € ð Œ;Ô˜uÒ$Ð$ÝÐW¨4¯9ª9©;¬;ÐWÐWÐWÑXÔXÐXõ ŒL˜¥5¤;°t´{ÐCÑCÔCßŠT•$•w Ñ%Ô%Ñ&Ô&ßŠZ˜ÑÔð 	ð
 ×,Ò,Ñ.Ô.Ð.r)   c                óÚ   — ddl m} | j        j        dt          j                             ¦   «         fv rn7 |¦   «         dk    r|                      ¦   «          n|                      ¦   «          | S )ú.See :meth:`torch.UntypedStorage.share_memory_`r   ©Úget_sharing_strategyrH   Úfile_system)	Útorch.multiprocessingr+  r   rF   rK   Ú_CÚ_get_privateuse1_backend_namer[   r]   )r$   r+  s     r'   Úshare_memory_z_StorageBase.share_memory_‰  sz   € à>Ð>Ð>Ð>Ð>Ð>àŒ;Ô ­¬×(NÒ(NÑ(PÔ(PÐQÐQÐQØØ!Ð!Ñ#Ô# }Ò4Ð4Ø×%Ò%Ñ'Ô'Ð'Ð'à×ÒÑ!Ô!Ð!Øˆr)   rØ   c               ó  — ddl m} t          j        |¦  «        }|j        dt          j                             ¦   «         dfv r | ||¬¦  «        S  |¦   «         dk    r|                      |¦  «        S |                      |¦  «        S )ú>Create a new storage in shared memory with the same data type.r   r*  rH   rP   rl   r,  )	r-  r+  rK   r   rF   r.  r/  ra   rd   )r`   rB   r   r+  s       r'   Ú_new_sharedz_StorageBase._new_shared•  s˜   € ð 	?Ð>Ð>Ð>Ð>Ð>å”˜fÑ%Ô%ˆØŒ;˜6¥5¤8×#IÒ#IÑ#KÔ#KÈUÐSÐSÐSØ�3�t FÐ+Ñ+Ô+Ð+Ø!Ð!Ñ#Ô# }Ò4Ð4Ø×.Ò.¨tÑ4Ô4Ð4à×(Ò(¨Ñ.Ô.Ð.r)   c                ó   — | S r!   r"   r.   s    r'   Úuntypedz_StorageBase.untyped¢  s   € Øˆr)   c                ó¼   — t           j                             |¦  «        }|j        r t	          t          |dz  ¦  «        d¦  «        }|                      |¦  «         dS )zSwap bytes in underlying data.é   é   N)rK   Ú_utilsÚ_element_sizeÚ
is_complexÚmaxrú   r–   )r$   rC   Ú	elem_sizes      r'   Úbyteswapz_StorageBase.byteswap¥  sU   € å”L×.Ò.¨uÑ5Ô5ˆ	àÔð 	3Ý�C 	¨A¡Ñ.Ô.°Ñ2Ô2ˆIØ�Š�yÑ!Ô!Ð!Ð!Ð!r)   ©r*   r   r!   )r7   r   r8   r9   r*   r   )r*   r   ©NF)rC   rD   r8   r   r*   r   )r*   r   )rB   r   r*   r
   ©r*   r
   )rB   r   ©r*   rD   )r   r   r8   r   ©rH   ©r   r   )VÚ__name__Ú
__module__Ú__qualname__Ú__annotations__r   r   r   r   r(   r/   r4   r6   r<   r>   r@   rB   rF   rH   rP   rR   rU   rW   rY   r[   r]   Úclassmethodra   rd   rg   rk   rp   rn   rs   ru   rw   rz   r|   r~   r€   r‚   r„   r†   rˆ   rŠ   ÚpropertyrŒ   rŽ   r’   r”   r–   r˜   r°   rµ   r¸   r½   rÉ   rÍ   r·   rÕ   rØ   rÛ   r   rL   rë   rï   ró   r÷   rú   rý   r  r  r  r
  r  r  r  r  r  r  r"  r%  r0  r3  r5  r>  Ú__classcell__©rÏ   s   @r'   r   r   )   s™  ø€ € € € € € Ø€K€K�KØ€IÐÐÐÑØ €MÐ Ð Ð Ñ ØÐÐÑð -1€LÐ0Ð0Ð0Ñ0à)-ÐÐ-Ð-Ð-Ñ-ðð ð ð"ð "ð "ð "ð"ð "ð "ð"ð "ð "ð"ð "ð "ð "ð "ð"ð "ð "ð "ð"ð "ð "ð "ðð ð ð ð CHð0ð 0ð 0ð 0ð 0ð ).ðBð Bð Bð Bð Bð"Bð Bð Bð Bð Bð"ð "ð "ð "ð!ð !ð !ð !ð"ð "ð "ð "ð"ð "ð "ð "ð"ð "ð "ð"ð "ð "ð ð"ð "ð "ñ „[ð"ð ð"ð "ð "ñ „[ð"ð ð"ð "ð "ñ „[ð"ð ð Øð	"ð 	"ð 	"ð 	"ð 	"ñ „[ð	"ð Ø04ð >ð >ð >ð >ñ „[ð>ð ð"ð "ð "ñ „[ð"ð ð"ð "ð "ñ „[ð"ð"ð "ð "ð "ð"ð "ð "ð"ð "ð "ð "ð"ð "ð "ð "ð"ð "ð "ð"ð "ð "ð"ð "ð "ð"ð "ð "ð "ð ð"ð "ð "ñ „[ð"ð"ð "ð "ð ð"ð "ñ „[ð"ð ð"ð "ñ „Xð"ð ð"ð "ñ „Xð"ð ð"ð "ð "ñ „[ð"ð ð"ð "ð "ñ „[ð"ð"ð "ð "ð"ð "ð "ð "ð*ð *ð *ð9ð 9ð 9ðð ð ðð ð ð3ð 3ð 3ð
2ð 2ð 2ð 2ð 2ðIð Ið Iðð ð ðð ð ðð ð ðð ð ð CHð /ð /ð /ð /ð /ð /ð
&ð &ð &ð%ð %ð %ð$ð $ð $ð$ð $ð $ð#ð #ð #ð%ð %ð %ð$ð $ð $ð%ð %ð %ð$ð $ð $ð(ð (ð (ð'ð 'ð 'ð&ð &ð &ð+ð +ð +ð-ð -ð -ð/ð /ð /ð/ð /ð /ð
ð 
ð 
ð 
ð 
ð /ð /ð /ð /ð /ð(
ð 
ð 
ð Ø).ð 
/ð 
/ð 
/ð 
/ñ „[ð
/ðð ð ð"ð "ð "ð "ð "ð "ð "r)   r   c                óF   ‡ — t          j        ‰ ¦  «        ˆ fd„¦   «         }|S )Nc                ó´  •— d }d }t           5  | j        }|t          v rt          |         }n<t          j        ¦   «         t          |<   t          |                              ¦   «          |}d d d ¦  «         n# 1 swxY w Y   |�|5  	 d d d ¦  «         n# 1 swxY w Y   	  ‰| g|¢R i |¤Ž|�T| j        |k    sJ ‚t           5  t          |                              ¦   «          t          |= d d d ¦  «         S # 1 swxY w Y   S S # |�T| j        |k    sJ ‚t           5  t          |                              ¦   «          t          |= d d d ¦  «         w # 1 swxY w Y   w w xY wr!   )Ú_share_memory_lockr   r   Ú	threadingÚRLockÚacquireÚrelease)r$   r%   r&   Úto_freeÚto_waitÚkeyÚfns         €r'   Úwrapperz-_share_memory_lock_protected.<locals>.wrapper¯  s�  ø€ àˆØˆÝð 	ð 	Ø”+ˆCØÕ'Ð'Ð'Ý+¨CÔ0��å)2¬Ñ):Ô):Õ! #Ñ&Ý! #Ô&×.Ò.Ñ0Ô0Ð0Ø�ð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð ÐØð ð Øðð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð	3Ø�2�dÐ,˜TÐ,Ð,Ð, VÐ,Ð,ð Ð"ð ”{ gÒ-Ð-Ð-Ð-Ý'ð 3ð 3Ý% gÔ.×6Ò6Ñ8Ô8Ð8Ý)¨'Ð2ð3ð 3ð 3ñ 3ô 3ð 3ð 3ð 3ð 3ð 3ð 3øøøð 3ð 3ð 3ð 3ð 3ð	 #øˆwÐ"ð ”{ gÒ-Ð-Ð-Ð-Ý'ð 3ð 3Ý% gÔ.×6Ò6Ñ8Ô8Ð8Ý)¨'Ð2ð3ð 3ð 3ñ 3ô 3ð 3ð 3ð 3ð 3ð 3ð 3øøøð 3ð 3ð 3ð 3ð 3ð	 #øøøsf   �AA4Á4A8Á;A8ÂBÂBÂBÂC? Â>(C2Ã2C6	Ã9C6	Ã?EÄ(E
Ä>EÅ
EÅEÅEÅE)Ú	functoolsÚwraps)rW  rX  s   ` r'   Ú_share_memory_lock_protectedr[  ®  s8   ø€ Ý„_�RÑÔð3ð 3ð 3ð 3ñ Ôð3ð> €Nr)   c                  ó°   ‡ — e Zd Zˆ fd„Zed„ ¦   «         Zed„ ¦   «         Zed
d„¦   «         Zeˆ fd„¦   «         Z	eˆ fd„¦   «         Z
eˆ fd	„¦   «         Zˆ xZS )r   c                ót   •— | j         j        dk    rt          d¦  «        ‚ t          ¦   «         j        |i |¤ŽS )Nr�   ú$Not available for 'meta' device type)r   rF   r-   rÌ   r4   ©r$   r%   r&   rÏ   s      €r'   r4   zUntypedStorage.__getitem__Ó  s>   ø€ ØŒ;Ô˜vÒ%Ð%Ý%Ð&LÑMÔMÐMØ"�u‰wŒwÔ" DÐ3¨FÐ3Ð3Ð3r)   c                ó"   — | j         j        dk    S ©NrH   ©r   rF   r.   s    r'   rŒ   zUntypedStorage.is_cudaØ  s   € àŒ{Ô 6Ò)Ð)r)   c                ó"   — | j         j        dk    S ©NrP   rb  r.   s    r'   rŽ   zUntypedStorage.is_hpuÜ  s   € àŒ{Ô 5Ò(Ð(r)   r*   rD   c                ó*   — |                       ¦   «         S )z÷Returns the file name associated with this storage.

        The file name will be a string if the storage is on CPU and was created via
        :meth:`~torch.from_file()` with ``shared`` as ``True``. This attribute is ``None`` otherwise.
        )r˜   r.   s    r'   r�   zUntypedStorage.filenameà  s   € ð ×!Ò!Ñ#Ô#Ð#r)   c                ó6   •—  t          ¦   «         j        |i |¤ŽS )a{  
        Moves the storage to shared memory.

        This is a no-op for storages already in shared memory and for CUDA
        storages, which do not need to be moved for sharing across processes.
        Storages in shared memory cannot be resized.

        Note that to mitigate issues like `this <https://github.com/pytorch/pytorch/issues/95606>`_
        it is thread safe to call this function from multiple threads on the same object.
        It is NOT thread safe though to call any other function on self without proper
        synchronization. Please see :doc:`/notes/multiprocessing` for more details.

        .. note::
            When all references to a storage in shared memory are deleted, the associated shared memory
            object will also be deleted. PyTorch has a special cleanup process to ensure that this happens
            even if the current process exits unexpectedly.

            It is worth noting the difference between :meth:`share_memory_` and :meth:`from_file` with ``shared = True``

            #. ``share_memory_`` uses `shm_open(3) <https://man7.org/linux/man-pages/man3/shm_open.3.html>`_ to create a
               POSIX shared memory object while :meth:`from_file` uses
               `open(2) <https://man7.org/linux/man-pages/man2/open.2.html>`_ to open the filename passed by the user.
            #. Both use an `mmap(2) call <https://man7.org/linux/man-pages/man2/mmap.2.html>`_ with ``MAP_SHARED``
               to map the file/object into the current virtual address space
            #. ``share_memory_`` will call ``shm_unlink(3)`` on the object after mapping it to make sure the shared memory
               object is freed when no process has the object open. ``torch.from_file(shared=True)`` does not unlink the
               file. This file is persistent and will remain until it is deleted by the user.

        Returns:
            ``self``
        )rÌ   r0  r_  s      €r'   r0  zUntypedStorage.share_memory_é  s"   ø€ ðB %�u‰wŒwÔ$ dÐ5¨fÐ5Ð5Ð5r)   c                ó6   •—  t          ¦   «         j        |i |¤ŽS r!   )rÌ   r]   r_  s      €r'   r]   zUntypedStorage._share_fd_cpu_  s   ø€ à%�u‰wŒwÔ% tÐ6¨vÐ6Ð6Ð6r)   c                ó6   •—  t          ¦   «         j        |i |¤ŽS r!   )rÌ   r[   r_  s      €r'   r[   z#UntypedStorage._share_filename_cpu_  s   ø€ à+�u‰wŒwÔ+¨TÐ<°VÐ<Ð<Ð<r)   rB  )rE  rF  rG  r4   rJ  rŒ   rŽ   r�   r[  r0  r]   r[   rK  rL  s   @r'   r   r   Ò  s  ø€ € € € € ð4ð 4ð 4ð 4ð 4ð
 ð*ð *ñ „Xð*ð ð)ð )ñ „Xð)ð ð$ð $ð $ñ „Xð$ð "ð 6ð  6ð  6ð  6ñ "Ô!ð 6ðD "ð7ð 7ð 7ð 7ñ "Ô!ð7ð "ð=ð =ð =ð =ñ "Ô!ð=ð =ð =ð =ð =r)   c                óR   — t          j        t          j        | ¦  «        d¬¦  «        S )NF)Úweights_only)rK   ÚloadrÂ   rÃ   )rÈ   s    r'   rÅ   rÅ     s   € ÝŒ:•b”j ‘m”m°%Ð8Ñ8Ô8Ð8r)   c                 óP  — t           j        t           j        t           j        t           j        t           j        t           j        t           j        t           j        t           j	        t           j
        t           j        t           j        t           j        t           j        t           j        hS r!   )rK   r  r  r  r  Úfloat8_e8m0fnuÚfloat4_e2m1fn_x2Úbits8Úbits16Úbits1x8Úbits2x4Úbits4x2Ú	complex32Úuint16Úuint32Úuint64r"   r)   r'   Ú_new_dtypesrx    s_   € õ
 	ÔÝÔÝÔÝÔÝÔÝÔÝŒÝŒÝŒÝŒÝŒÝŒÝŒÝŒÝŒðð r)   c                 óÀ  — i t           j        d“t           j        d“t           j        d“t           j        d“t           j        d“t           j        d“t           j        d“t           j        d“t           j	        d	“t           j
        d
“t           j        d“t           j        d“t           j        d“t           j        d“t           j        d“t           j        d“t           j        d“S )NÚDoubleStorageÚFloatStorageÚHalfStorageÚLongStorageÚ
IntStorageÚShortStorageÚCharStorageÚByteStorageÚBoolStorageÚBFloat16StorageÚComplexDoubleStorageÚComplexFloatStorageÚQInt8StorageÚQInt32StorageÚQUInt8StorageÚQUInt4x2StorageÚQUInt2x4Storage)rK   rë   rï   ró   r÷   rú   Úint16r   râ   r  r
  r  r  Úqint8Úqint32Úquint8Úquint4x2Úquint2x4r"   r)   r'   Ú_dtype_to_storage_type_mapr‘  0  sû   € ðÝŒ�oðåŒ�^ðõ 	Œ
�Mðõ 	Œ
�Mð	õ
 	Œ	�<ðõ 	Œ�^ðõ 	Œ
�Mðõ 	Œ�]ðõ 	Œ
�Mðõ 	ŒÐ)ðõ 	ŒÐ-ðõ 	ŒÐ+ðõ 	Œ�^ðõ 	Œ�oðõ 	Œ�oðõ  	ŒÐ)ð!õ" 	ŒÐ)ð#ð r)   c                 óZ   — d„ t          ¦   «                              ¦   «         D ¦   «         } | S )Nc                ó   — i | ]\  }}||“Œ	S r"   r"   )r¥   rV  Úvals      r'   ú
<dictcomp>z._storage_type_to_dtype_map.<locals>.<dictcomp>N  s   € ÐOÐOÐO™h˜c 3��cÐOÐOÐOr)   )r‘  Úitems)Ú	dtype_maps    r'   Ú_storage_type_to_dtype_mapr˜  L  s.   € àOÐOÕ*DÑ*FÔ*F×*LÒ*LÑ*NÔ*NÐOÑOÔO€IØÐr)   c           
     óô  — |t           j        t           j        t           j        t           j        t           j        fv rŽt           j        t           j        t           j        t           j        t           j        t           j        t           j        t           j        t           j        t           j        i}t          j	        | ||         |¬¦  «        }nt          j	        | ||¬¦  «        }| 
                    ¦   «         j        S )NrÞ   )rK   rŽ  r�  r�  r�  rŒ  râ   Úint32r   rá   rä   Ú_untyped_storage)ÚsequencerC   r   Úinterpret_dtypesÚ
tmp_tensors        r'   Ú_get_storage_from_sequencerŸ  R  s¸   € ØÝŒÝŒÝŒÝŒÝŒðð ð õ ŒL�%œ+ÝŒN�EœKÝŒN�EœKÝŒL�%œ+ÝŒK�œð
Ðõ ”\ØÐ,¨UÔ3¸Fð
ñ 
ô 
ˆ
ˆ
õ
 ”\ (°%ÀÐGÑGÔGˆ
à×$Ò$Ñ&Ô&Ô7Ð7r)   c                ó|   — t           r!t          | t          t          j        f¦  «        S t          | t          ¦  «        S r!   )Ú	HAS_NUMPYrß   rú   ÚnpÚinteger)Úxs    r'   Ú_isintr¥  k  s1   € Ýð "Ý˜!�c¥2¤:Ð.Ñ/Ô/Ð/å˜!�SÑ!Ô!Ð!r)   c                 ó   — t           S r!   )Ú"_always_warn_typed_storage_removalr"   r)   r'   Ú&_get_always_warn_typed_storage_removalr¨  u  s   € Ý-Ð-r)   c                ó8   — t          | t          ¦  «        sJ ‚| ad S r!   )rß   r  r§  )Úalways_warns    r'   Ú&_set_always_warn_typed_storage_removalr«  y  s$   € å�k¥4Ñ(Ô(Ð(Ð(Ð(Ø)4Ð&Ð&Ð&r)   r7  c                ó    — d„ }t          ¦   «         s
 |¦   «         r2d}t          j        |t          | dz   ¬¦  «         dt          j        d<   d S d S )Nc                 óV   — t          t          d¦  «        sdS t          j        d          S )NÚ
has_warnedT)ÚhasattrÚ_warn_typed_storage_removalÚ__dict__r"   r)   r'   Úis_first_timez2_warn_typed_storage_removal.<locals>.is_first_time‚  s,   € ÝÕ2°LÑAÔAð 	JØ�4å2Ô;¸LÔIÐIÐIr)   a  TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()r8  )Ú
stacklevelTr®  )r¨  ÚwarningsÚwarnÚUserWarningr°  r±  )r³  r²  Úmessages      r'   r°  r°    s{   € ðJð Jð Jõ .Ñ/Ô/ð B°=°=±?´?ð BðQð 	õ 	Œ�g�{°zÀA±~ÐFÑFÔFÐFØ=AÕ#Ô,¨\Ñ:Ð:Ð:ðBð Br)   c                 ó$   — dt           j        d<   d S )NFr®  )r°  r±  r"   r)   r'   Ú!_reset_warn_typed_storage_removalr¹  “  s   € Ø9>ÕÔ(¨Ñ6Ð6Ð6r)   Úmoduler£   c                óˆ   — |                       dd¦  «        d         }|dt          j                             ¦   «         dfv r|S dS )Nú.r8  éÿÿÿÿrH   rP   rØ   )ÚrsplitrK   r.  r/  )rº  Ú	last_parts     r'   Ú_get_device_from_modulerÀ  —  sE   € Ø—’˜c 1Ñ%Ô% bÔ)€IØ�V�UœX×CÒCÑEÔEÀuÐMÐMÐMØÐàˆur)   c                  ó|  ‡ — e Zd ZU dZded<   dZded<   ded<   ed	„ ¦   «         Zedtd„¦   «         Zd„ Z	dddddœˆ fd„
Z
dddddœd„Zed„ ¦   «         Zed„ ¦   «         Zd„ Zdud„Zd„ Zdvd„Zd„ Zd„ Zd„ Zd„ Zdwdxd!„Zd"„ Zd#„ Z	 	 dydzd&„Zdydud'„Zdydud(„Zdd)œd{d,„Zd-„ Zd.„ Zd|d0„Zd1„ Z d2„ Z!d3„ Z"d4„ Z#d5„ Z$d6„ Z%ˆ fd7„Z&d8„ Z'd9„ Z(d:„ Z)d}d~d=„Z*d}d~d>„Z+d?„ Z,d@„ Z-ddAœdB„Z.edC„ ¦   «         Z/edD„ ¦   «         Z0dE„ Z1dF„ Z2dG„ Z3dH„ Z4dI„ Z5dJ„ Z6dK„ Z7dL„ Z8dM„ Z9dN„ Z:e;dO„ ¦   «         Z<dP„ Z=e;dQ„ ¦   «         Z>e;dddRœdS„¦   «         Z?dT„ Z@dU„ ZAdV„ ZBdW„ ZCdX„ ZDdY„ ZEdZ„ ZFd[„ ZGd\„ ZHd]„ ZId^„ ZJd_„ ZKd`„ ZLda„ ZMdb„ ZNdc„ ZOdd„ ZPe;de„ ¦   «         ZQe;df„ ¦   «         ZRdg„ ZSdh„ ZTdi„ ZUdj„ ZVdk„ ZWdl„ ZXe;dm„ ¦   «         ZYdn„ ZZdo„ Z[e;ddAœdp„¦   «         Z\dq„ Z]dr„ Z^ds„ Z_ˆ xZ`S )r   Fr   r   Nr   r   útorch.dtyperC   c                ó   — | j         S r!   )rC   r.   s    r'   Ú_dtypezTypedStorage._dtype¦  s
   € àŒzÐr)   r*   rD   c                ó   — | j         j        S )z­Returns the file name associated with this storage if the storage was memory mapped from a file.
        or ``None`` if the storage was not created by memory mapping a file.)r›  r�   r.   s    r'   r�   zTypedStorage.filenameª  s   € ð Ô$Ô-Ð-r)   c                óŽ   — t          ¦   «          |                      t          d|                      ¦   «         ¦  «        |¦  «         | S )Nr   )r°  Ú_setitemÚsliceÚ_size)r$   Úvalues     r'   Úfill_zTypedStorage.fill_°  s9   € Ý#Ñ%Ô%Ð%Ø�Š•e˜A˜tŸzšz™|œ|Ñ,Ô,¨eÑ4Ô4Ð4Øˆr)   )Úwrap_storagerC   r   Ú	_internalc               ó  •— |st          ¦   «          | t          j        j        k    rt	          d¦  «        ‚| t
          k    r!t          ¦   «                              | ¦  «        S | › d�}|�t	          |dz   ¦  «        ‚|�t	          |dz   ¦  «        ‚|€¿t          |¦  «        dk    rt	          |dz   ¦  «        ‚t          |¦  «        dk    rbt          |d         ¦  «        sMt          |d         t          j        j        ¦  «        s(t          |dt          |d         ¦  «        › �z   ¦  «        ‚t          || j        t#          | j        ¦  «        d	d
œŽS t          |¦  «        dk    rt	          |dz   ¦  «        ‚t          |t          j        ¦  «        s"t          |dt          |¦  «        › �z   ¦  «        ‚t#          | j        ¦  «        }|j        j        |k    r"t	          |d|› d|j        j        › �z   ¦  «        ‚t          ||| j        d	dœŽS )Nz8Only child classes of _LegacyStorage can be instantiatedzœ.__new__ received an invalid combination of arguments. Expected one of:
 * no arguments
 * (int size)
 * (Sequence data)
 * (*, UntypedStorage wrap_storage)z.
Keyword argument 'device' cannot be specifiedz-
Keyword argument 'dtype' cannot be specifiedr8  ú
Too many positional argumentsr   ú
Argument type not recognized: T)rC   r   rÍ  úB
No positional arguments should be given when using 'wrap_storage'ú9
Argument 'wrap_storage' must be UntypedStorage, but got z"
Device of 'wrap_storage' must be z
, but got ©rÌ  rC   rÍ  )r°  rK   ræ   Ú_LegacyStorageÚRuntimeErrorr   rÌ   Ú__new__rª   r¥  rß   ÚcollectionsÚabcÚSequencerà   rF   rÄ  rÀ  rF  r   r   rC   )	r`   rÌ  rC   r   rÍ  r%   Úarg_error_msgÚ
cls_devicerÏ   s	           €r'   rÖ  zTypedStorage.__new__µ  s—  ø€ ð ð 	*Ý'Ñ)Ô)Ð)à•%”-Ô.Ò.Ð.ÝØJñô ð ð •,ÒÐÝ‘7”7—?’? 3Ñ'Ô'Ð'ð ð 6ð 6ð 6ð ð Ð!Ý"Ø!Ð$UÑUñô ð ð Ð Ý"Ø!Ð$TÑTñô ð ð Ð#Ý�t‘9”9˜q’=�=Ý&Ø%Ð(IÑIñô ð õ
 ˜‘I”I ’N�NÝ" 4¨¤7™OœOð #å& t¨A¤wµ´Ô0HÑIÔIð #õ $Ø%ØL½TÀ$ÀqÄ'¹]¼]ÐLÐLñMñô ð õ
 $ØØœ*Ý2°3´>ÑBÔBØ"ð	ð ð ð õ �t‘9”9 ’>�>Ý&Ø%ð)ñ)ñô ð õ " ,µÔ0DÑEÔEð Ý#Ø%ØkÕW[Ð\hÑWiÔWiÐkÐkñlñô ð õ
 5°S´^ÑDÔD�
àÔ&Ô+¨zÒ9Ð9Ý&Ø%ð@À
ð @ð @Ø%1Ô%8Ô%=ð@ð @ñ@ñô ð õ $ØØ!-Øœ)Ø"ð	ð ð ð r)   )r   rC   rÌ  rÍ  c               ó,  — |st          ¦   «          d}|�Õt          |¦  «        dk    rt          |dz   ¦  «        ‚|€t          |dz   ¦  «        ‚t          |t          j        ¦  «        s"t          |dt          |¦  «        › �z   ¦  «        ‚|�t          |dz   ¦  «        ‚|| _        t          |t          j        ¦  «        s"t          |dt          |¦  «        › �z   ¦  «        ‚|| _	        d S |€t	          j
        ¦   «         n|| _        t	          j        |€dn|¦  «        }| j        t          j        t          j        t          j        t          j        t          j        fv r|j        d	k    rt          d
¦  «        ‚t          |¦  «        dk    rt	          j        |¬¦  «        | _	        d S t          |¦  «        dk    rÊt#          |d         ¦  «        rEt	          j        t%          |d         ¦  «        |                      ¦   «         z  |¬¦  «        | _	        d S t          |d         t(          j        j        ¦  «        r#t/          |d         | j        |¦  «        | _	        d S t          |dt          |d         ¦  «        › �z   ¦  «        ‚t          |dz   ¦  «        ‚)Na1  TypedStorage.__init__ received an invalid combination of arguments. Expected one of:
 * (*, torch.device device, torch.dtype dtype)
 * (int size, *, torch.device device, torch.dtype dtype)
 * (Sequence data, *, torch.device device, torch.dtype dtype)
 * (*, UntypedStorage wrap_storage, torch.dtype dtype)r   rÑ  z#
Argument 'dtype' must be specifiedz+
Argument 'dtype' must be torch.dtype, not zG
Argument 'device' should not be specified when 'wrap_storage' is givenrÒ  rØ   rH   ú/Cannot create CUDA storage with quantized dtyperl   r8  rÐ  rÏ  )r°  rª   rÕ  rß   rK   rC   rà   rF   r   r›  Úget_default_dtyper   rŽ  r�  r�  r�  rŒ  r¥  rú   r:  r×  rØ  rÙ  rŸ  )r$   r   rC   rÌ  rÍ  r%   rÚ  s          r'   r(   zTypedStorage.__init__  sÜ  € ð ð 	*Ý'Ñ)Ô)Ð)ðEð 	ð Ð#Ý�4‰yŒy˜AŠ~ˆ~Ý"Ø!ð%ñ%ñô ð ð ˆ}Ý"Ø!Ð$JÑJñô ð õ ˜e¥U¤[Ñ1Ô1ð ÝØ!ØRÅTÈ%Á[Ä[ÐRÐRñSñô ð ð
 Ð!Ý"Ø!Ø`ñañô ð ð
 ˆDŒJå˜l­EÔ,@ÑAÔAð ÝØ!ØgÕSWÐXdÑSeÔSeÐgÐgñhñô ð ð
 %1ˆDÔ!Ð!Ð!ð 7<°m�Ô0Ñ2Ô2Ð2ÈˆDŒJÝ”\¨6¨> % %¸vÑFÔFˆFàŒzÝ”Ý”Ý”Ý”Ý”ðð ð ð ”; &Ò(Ð(Ý&ØIñô ð õ �4‰yŒy˜AŠ~ˆ~Ý(-Ô(<ÀFÐ(KÑ(KÔ(K�Ô%Ð%Ð%å�T‘”˜a’�Ý˜$˜qœ'‘?”?ð Ý,1Ô,@Ý˜D œG™œ t×'9Ò'9Ñ';Ô';Ñ;ÀFð-ñ -ô -�DÔ)Ð)Ð)õ    Q¤­¬Ô)AÑBÔBð Ý,FØ˜Qœ ¤¨Vñ-ô -�DÔ)Ð)Ð)õ $Ø%ØL½TÀ$ÀqÄ'¹]¼]ÐLÐLñMñô ð õ # =Ð3TÑ#TÑUÔUÐUr)   c                óH   — t          ¦   «          | j        j        j        dk    S ra  ©r°  r›  r   rF   r.   s    r'   rŒ   zTypedStorage.is_cudal  s"   € å#Ñ%Ô%Ð%ØÔ$Ô+Ô0°FÒ:Ð:r)   c                óH   — t          ¦   «          | j        j        j        dk    S rd  rà  r.   s    r'   rŽ   zTypedStorage.is_hpuq  s"   € å#Ñ%Ô%Ð%ØÔ$Ô+Ô0°EÒ9Ð9r)   c                ó,   — t          ¦   «          | j        S )z2Return the internal :class:`torch.UntypedStorage`.)r°  r›  r.   s    r'   r5  zTypedStorage.untypedv  s   € å#Ñ%Ô%Ð%ØÔ$Ð$r)   r
   c                óö   — t          |¦  «        t          j        k    sJ ‚t          | ¦  «        t          k    r*t	          t
          t          || j        d¬¦  «        ¦  «        S  t          | ¦  «        |¬¦  «        S )NTrÓ  ©rÌ  )rF   rK   r   r   r   r
   rC   )r$   r&  s     r'   Ú_new_wrapped_storagez!TypedStorage._new_wrapped_storage{  sz   € Ý�OÑ$Ô$­Ô(<Ò<Ð<Ð<Ð<å�‰:Œ:�Ò%Ð%ÝÝÝØ!0¸¼
Èdðñ ô ñô ð ð •4˜‘:”:¨?Ð;Ñ;Ô;Ð;r)   c                óF   — t          ¦   «          |                      ¦   «         S r!   ©r°  rÉ  r.   s    r'   r/   zTypedStorage.__len__ˆ  ó   € Ý#Ñ%Ô%Ð%Ø�zŠz‰|Œ|Ðr)   c                ó”  — |€|r|                       ¦   «         S dS t          |¦  «        t          k    r/t          dt          | ¦  «        › dt          |¦  «        › �¦  «        ‚|rw||                       ¦   «         k    s||                       ¦   «          k     r't	          d|› d|                      ¦   «         › �¦  «        ‚|dk    r|S ||                       ¦   «         z  S ||                       ¦   «         k    s||                       ¦   «          k     r't	          d|› d|                      ¦   «         › �¦  «        ‚||                       ¦   «         z  S )Nr   úcan't index a ú with zindex z" out of range for storage of size )rÉ  rF   rú   rà   Ú
IndexErrorrB   )r$   r3   Úis_stops      r'   Ú_maybe_wrap_indexzTypedStorage._maybe_wrap_indexŒ  sH  € Øˆ;Øð Ø—z’z‘|”|Ð#à�qõ �C‰yŒy�CÒÐÝÐ Nµ°d±´Ð NÐ NÅ4ÈÁ9Ä9Ð NÐ NÑOÔOÐOØð *Ø˜$Ÿ*š*™,œ,Ò&Ð&¨C°4·:²:±<´<°-Ò,?Ð,?Ý$ØU ÐUÐUÈÏ	Ê	ÉÌÐUÐUñô ð ð ˜’7�7Ø�Jà §¢¡¤Ñ-Ð-à˜4Ÿ:š:™<œ<Ò'Ð'¨S°D·J²J±L´L°=Ò-@Ð-@Ý$ØU ÐUÐUÈÏ	Ê	ÉÌÐUÐUñô ð ð ˜TŸZšZ™\œ\Ñ)Ð)r)   c                óJ   — t          ¦   «          |                      ||¦  «        S r!   )r°  rÇ  )r$   r3   rÊ  s      r'   r6   zTypedStorage.__setitem__¦  s"   € Ý#Ñ%Ô%Ð%Ø�}Š}˜S %Ñ(Ô(Ð(r)   c           
     ó�  — t          |t          t          f¦  «        s/t          dt	          | ¦  «        › dt	          |¦  «        › �¦  «        ‚t          j        |¦  «        rt          dt	          |¦  «        › �¦  «        ‚| j        t
          j        t
          j	        t
          j
        t
          j        t
          j        fv rÉt
          j        t
          j        t
          j	        t
          j        t
          j
        t
          j        t
          j        t
          j        t
          j        t
          j        i}|| j                 }t          j        g || j        j        ¬¦  «        }|                     t)          | j        |d¬¦  «        ¦  «         n9t          j        g | j        | j        j        ¬¦  «                             | ¦  «        }|||<   d S )Nrê  rë  z cannot set item with value type rÞ   TrÓ  )rß   rú   rÈ  rÕ  rF   rK   Ú
is_storagerC   rŽ  r�  r�  r�  rŒ  râ   rš  r   rá   r›  r   rã   r   )r$   r3   rÊ  r�  Ú	tmp_dtyperž  s         r'   rÇ  zTypedStorage._setitemª  sˆ  € Ý˜#¥¥U˜|Ñ,Ô,ð 	OÝÐMµ°T±
´
ÐMÐMÅ$ÀsÁ)Ä)ÐMÐMÑNÔNÐNÝÔ˜EÑ"Ô"ð 	QÝÐOÅ$ÀuÁ+Ä+ÐOÐOÑPÔPÐPØŒ:ÝŒLÝŒNÝŒNÝŒLÝŒKð
ð 
ð 
õ ”�eœkÝ”¥¤Ý”¥¤Ý”�eœkÝ”�UœZð Ðð )¨¬Ô4ˆIÝœØ˜)¨DÔ,AÔ,Hðñ ô ˆJð �OŠOÝØ!%Ô!6¸iÐSWðñ ô ñô ð ð õ œØ˜$œ*¨TÔ-BÔ-Iðñ ô çŠd�4‰jŒjð ð  ˆ
�3‰ˆˆr)   c                óH   — t          ¦   «          |                      |¦  «        S r!   )r°  Ú_getitemr2   s     r'   r4   zTypedStorage.__getitem__Í  s    € Ý#Ñ%Ô%Ð%Ø�}Š}˜SÑ!Ô!Ð!r)   c           
     ó  — | j         j        j        dk    rt          d¦  «        ‚t	          |t
          ¦  «        rt          d¦  «        ‚t	          |t          ¦  «        s/t          dt          | ¦  «        › dt          |¦  «        › �¦  «        ‚| j        t          j
        t          j        t          j        t          j        t          j        fv r¥t          j
        t          j        t          j        t          j        t          j        t          j        t          j        t          j        t          j        t          j        i}t%          | j         || j                 d¬¦  «                             |¦  «        S |                      |¦  «        }dd	lm}  |¦   «         5  t          j        g | j        | j         j        ¬
¦  «                             | ¦  «        }||                              ¦   «         cd d d ¦  «         S # 1 swxY w Y   d S )Nr�   r^  z7slices are only supported in UntypedStorage.__getitem__rê  rë  TrÓ  r   )Úunset_fake_temporarilyrÞ   )r›  r   rF   r-   rß   rÈ  rÕ  rú   rC   rK   rŽ  r�  r�  r�  rŒ  râ   rš  r   r   rô  rî  Útorch._subclasses.fake_tensorrö  rá   rã   Úitem)r$   r3   r�  Úidx_wrappedrö  rž  s         r'   rô  zTypedStorage._getitemÑ  s  € ØÔ Ô'Ô,°Ò6Ð6Ý%Ð&LÑMÔMÐMõ �c�5Ñ!Ô!ð 	OÝØIñô ð õ ˜C¥Ñ%Ô%ð 	OÝÐMµ°T±
´
ÐMÐMÅ$ÀsÁ)Ä)ÐMÐMÑNÔNÐNàŒ:ÝŒLÝŒNÝŒNÝŒLÝŒKð
ð 
ð 
õ ”�eœkÝ”¥¤Ý”¥¤Ý”�eœkÝ”�UœZð Ðõ  Ø!Ô2Ø& t¤zÔ2Øðñ ô ÷ Šh�s‰mŒmð	ð ×,Ò,¨SÑ1Ô1ˆØHÐHÐHÐHÐHÐHà#Ð#Ñ%Ô%ð 	2ð 	2ÝœØ˜$œ*¨TÔ-BÔ-Iðñ ô çŠd�4‰jŒjð ð ˜kÔ*×/Ò/Ñ1Ô1ð		2ð 	2ð 	2ð 	2ñ 	2ô 	2ð 	2ð 	2ð 	2ð 	2ð 	2ð 	2øøøð 	2ð 	2ð 	2ð 	2ð 	2ð 	2s   ÆAG7Ç7G;Ç>G;r7   r   r8   ú_Optional[bool]c                óÄ   — t          ¦   «          t          |t          ¦  «        r!| j                             |j        |¦  «         n| j                             ||¦  «         | S r!   )r°  rß   r   r›  r<   r;   s      r'   r<   zTypedStorage.copy_ý  s]   € Ý#Ñ%Ô%Ð%Ý�f�lÑ+Ô+ð 	>ØÔ!×'Ò'¨Ô(?ÀÑNÔNÐNÐNàÔ!×'Ò'¨°Ñ=Ô=Ð=Øˆr)   c                óF   — t          ¦   «          |                      ¦   «         S r!   )r°  Ú_nbytesr.   s    r'   r@   zTypedStorage.nbytes  s   € Ý#Ñ%Ô%Ð%Ø�|Š|‰~Œ~Ðr)   c                ó4   — | j                              ¦   «         S r!   )r›  r@   r.   s    r'   rý  zTypedStorage._nbytes
  s   € ØÔ$×+Ò+Ñ-Ô-Ð-r)   r  ú&Union[_StorageBase, TypedStorage, str]c                ó  — t          ¦   «          |€V|                      ¦   «         }|�|j        dz   |j        z   S d                     | j        t          | ¦  «        j        g¦  «        S | j                             ||¦  «        S )Nr¼  )r°  Ú_get_legacy_storage_classrF  rE  r«   rF   r›  )r$   rC   r8   Úlegacy_classs       r'   rF   zTypedStorage.type  s   € õ
 	$Ñ%Ô%Ð%Øˆ=Ø×9Ò9Ñ;Ô;ˆLàÐ'Ø#Ô.°Ñ4°|Ô7LÑLÐLà—8’8˜Tœ_­d°4©j¬jÔ.AÐBÑCÔCÐCð Ô(×-Ò-¨e°\ÑBÔBÐBr)   c                ó  — t          ¦   «          | j        t          j        t          j        t          j        t          j        t          j        fv rt          d¦  «        ‚| j	         
                    ||¦  «        }|                      |¦  «        S )NrÝ  )r°  rC   rK   rŽ  r�  r�  r�  rŒ  rÕ  r›  rH   rå  )r$   r   r8   Úcuda_storages       r'   rH   zTypedStorage.cuda  sx   € Ý#Ñ%Ô%Ð%ØŒ:ÝŒLÝŒNÝŒNÝŒLÝŒKð
ð 
ð 
õ ÐPÑQÔQÐQØÔ,×1Ò1°&¸,ÑGÔGˆØ×(Ò(¨Ñ6Ô6Ð6r)   c                ó  — t          ¦   «          | j        t          j        t          j        t          j        t          j        t          j        fv rt          d¦  «        ‚| j	         
                    ||¦  «        }|                      |¦  «        S )Nz.Cannot create HPU storage with quantized dtype)r°  rC   rK   rŽ  r�  r�  r�  rŒ  rÕ  r›  rP   rå  )r$   r   r8   Úhpu_storages       r'   rP   zTypedStorage.hpu+  sx   € Ý#Ñ%Ô%Ð%ØŒ:ÝŒLÝŒNÝŒNÝŒLÝŒKð
ð 
ð 
õ ÐOÑPÔPÐPØÔ+×/Ò/°¸ÑEÔEˆØ×(Ò(¨Ñ5Ô5Ð5r)   rç   r   r   c               ó°  — t          ¦   «          t          |t          j        ¦  «        st          j        |¦  «        }| j        t          j        t          j        t          j        t          j        t          j	        fv r*t          d|j                             ¦   «         › d�¦  «        ‚| j                             ||¬¦  «        }|                      |¦  «        S )NzCannot create z storage with quantized dtyperI   )r°  rß   rK   r   rC   rŽ  r�  r�  r�  rŒ  rÕ  rF   Úupperr›  rL   rå  )r$   r   r8   Ú
to_storages       r'   rL   zTypedStorage.to8  s¿   € Ý#Ñ%Ô%Ð%Ý˜&¥%¤,Ñ/Ô/ð 	*Ý”\ &Ñ)Ô)ˆFØŒ:ÝŒLÝŒNÝŒNÝŒLÝŒKð
ð 
ð 
õ ØS ¤×!2Ò!2Ñ!4Ô!4ÐSÐSÐSñô ð ð Ô*×-Ò-°VÈ,Ð-ÑWÔWˆ
Ø×(Ò(¨Ñ4Ô4Ð4r)   c                óF   — t          ¦   «          |                      ¦   «         S r!   )r°  r:  r.   s    r'   rR   zTypedStorage.element_sizeI  s    € Ý#Ñ%Ô%Ð%Ø×!Ò!Ñ#Ô#Ð#r)   c                óJ   — t           j                             | j        ¦  «        S r!   )rK   r9  r:  rC   r.   s    r'   r:  zTypedStorage._element_sizeN  s   € ÝŒ|×)Ò)¨$¬*Ñ5Ô5Ð5r)   r   c                óP   — t          ¦   «          | j                             ¦   «         S r!   )r°  r›  rU   r.   s    r'   rU   zTypedStorage.get_deviceQ  s#   € Ý#Ñ%Ô%Ð%ØÔ$×/Ò/Ñ1Ô1Ð1r)   c           
     óP  ‡ — t          ¦   «          dt          j        ‰ ¦  «        › d‰ j        › d‰ j        › dt          ‰ ¦  «        › d�	}‰ j        j        dk    rd|z   S dd	                     ˆ fd
„t          ‰  	                    ¦   «         ¦  «        D ¦   «         ¦  «        z   }|dz   |z   S )Nrš   z(dtype=z	, device=r›   rœ   r�   rž   rŸ   r    c              3  óB   •K  — | ]}t          ‰|         ¦  «        V — Œd S r!   r¢   r¤   s     €r'   r§   z'TypedStorage.__str__.<locals>.<genexpr>^  s-   øè è € Ð'QÐ'Q¸­¨D°¬G©¬Ð'QÐ'QÐ'QÐ'QÐ'QÐ'Qr)   r¨   )
r°  rK   r©   rC   r   rª   rF   r«   r¬   rB   r­   s   `  r'   Ú__str__zTypedStorage.__str__U  sË   ø€ Ý#Ñ%Ô%Ð%ð:•”˜tÑ$Ô$ð :ð :¨T¬Zð :ð :Ø”kð:ð :Ý-0°©Y¬Yð:ð :ð :ð 	ð Œ;Ô˜vÒ%Ð%Ø˜XÑ%Ð%à˜UŸZšZÐ'QÐ'QÐ'QÐ'Q½eÀDÇIÂIÁKÄKÑ>PÔ>PÐ'QÑ'QÔ'QÑQÔQÑQˆHØ˜d‘? XÑ-Ð-r)   c                ó<   — t          ¦   «          t          | ¦  «        S r!   )r°  r£   r.   s    r'   r°   zTypedStorage.__repr__a  s   € Ý#Ñ%Ô%Ð%Ý�4‰yŒyÐr)   c                ó”   ‡ — t          ¦   «          t          ˆ fd„t          ‰                      ¦   «         ¦  «        D ¦   «         ¦  «        S )Nc              3  ó(   •K  — | ]}‰|         V — Œd S r!   r"   r¤   s     €r'   r§   z(TypedStorage.__iter__.<locals>.<genexpr>g  r³   r)   )r°  r´   r¬   rB   r.   s   `r'   rµ   zTypedStorage.__iter__e  sB   ø€ Ý#Ñ%Ô%Ð%ÝÐ8Ð8Ð8Ð8¥U¨4¯9ª9©;¬;Ñ%7Ô%7Ð8Ñ8Ô8Ñ8Ô8Ð8r)   c                óv   — t          ¦   «          |                      t          j        | j        ¦  «        ¦  «        S r!   )r°  rå  Úcopyr›  r.   s    r'   r¸   zTypedStorage.__copy__i  s/   € Ý#Ñ%Ô%Ð%Ø×(Ò(­¬°4Ô3HÑ)IÔ)IÑJÔJÐJr)   c                óH   — t          ¦   «          |                      |¦  «        S r!   )r°  Ú	_deepcopy©r$   r»   s     r'   r½   zTypedStorage.__deepcopy__m  s    € Ý#Ñ%Ô%Ð%Ø�~Š~˜dÑ#Ô#Ð#r)   c                ó\   — |                       t          j        | j        |¦  «        ¦  «        S r!   )rå  r  Údeepcopyr›  r  s     r'   r  zTypedStorage._deepcopyr  s%   € Ø×(Ò(­¬°tÔ7LÈdÑ)SÔ)SÑTÔTÐTr)   c                óŠ   •— t          ¦   «          t          ¦   «                              ¦   «         |                      ¦   «         z   S r!   )r°  rÌ   rÍ   r@   rÎ   s    €r'   rÍ   zTypedStorage.__sizeof__u  s2   ø€ Ý#Ñ%Ô%Ð%Ý‰wŒw×!Ò!Ñ#Ô# d§k¢k¡m¤mÑ3Ð3r)   c                óv   — t          ¦   «          |                      | j                             ¦   «         ¦  «        S )rÑ   )r°  rå  r›  r·   r.   s    r'   r·   zTypedStorage.cloney  s1   € å#Ñ%Ô%Ð%Ø×(Ò(¨Ô)>×)DÒ)DÑ)FÔ)FÑGÔGÐGr)   c                ó<   — t          ¦   «          t          | ¦  «        S rÓ   )r°  rÔ   r.   s    r'   rÕ   zTypedStorage.tolist~  s   € å#Ñ%Ô%Ð%Ý�D‰zŒzÐr)   c                óv   — t          ¦   «          |                      | j                             ¦   «         ¦  «        S )r×   )r°  rå  r›  rØ   r.   s    r'   rØ   zTypedStorage.cpuƒ  s1   € å#Ñ%Ô%Ð%Ø×(Ò(¨Ô)>×)BÒ)BÑ)DÔ)DÑEÔEÐEr)   rH   r   c                óR   — t          ¦   «          | j                             |¦  «        S )a2  Determine whether the CPU TypedStorage is already pinned on device.

        Args:
            device (str or torch.device): The device to pin memory on (default: ``'cuda'``).
                This argument is discouraged and subject to deprecated.

        Returns:
            A boolean variable.
        )r°  r›  r"  r#  s     r'   r"  zTypedStorage.is_pinnedˆ  s'   € õ 	$Ñ%Ô%Ð%ØÔ$×.Ò.¨vÑ6Ô6Ð6r)   c                óz   — t          ¦   «          |                      | j                             |¬¦  «        ¦  «        S )a8  Copy the CPU TypedStorage to pinned memory, if it's not already pinned.

        Args:
            device (str or torch.device): The device to pin memory on (default: ``'cuda'``).
                This argument is discouraged and subject to deprecated.

        Returns:
            A pinned CPU storage.
        rl   )r°  rå  r›  r%  r#  s     r'   r%  zTypedStorage.pin_memory•  s?   € õ 	$Ñ%Ô%Ð%Ø×(Ò(ØÔ!×,Ò,°FÐ,Ñ;Ô;ñ
ô 
ð 	
r)   c                óF   — t          ¦   «          |                      ¦   «         S )r)  )r°  Ú_share_memory_r.   s    r'   r0  zTypedStorage.share_memory_¤  s    € å#Ñ%Ô%Ð%Ø×"Ò"Ñ$Ô$Ð$r)   c                ó8   — | j                              ¦   «          | S r!   )r›  r0  r.   s    r'   r!  zTypedStorage._share_memory_ª  s   € ØÔ×+Ò+Ñ-Ô-Ð-Øˆr)   rl   c               óÌ   — |€d}t          j        |¦  «        }t           j                             ||                      ¦   «         z  |¬¦  «        }t          || j        d¬¦  «        S )r2  NrØ   rl   TrÓ  )rK   r   r   r3  r:  r   rC   )r$   rB   r   r&  s       r'   r3  zTypedStorage._new_shared®  sp   € àˆ>ØˆFÝ”˜fÑ%Ô%ˆÝÔ.×:Ò:Ø�4×%Ò%Ñ'Ô'Ñ'°ð ;ñ 
ô 
ˆõ Ø(°´
Àdð
ñ 
ô 
ð 	
r)   c                ó   — | j         j        S r!   )r›  r   r.   s    r'   r   zTypedStorage._cdataº  s   € àÔ$Ô+Ð+r)   c                ó6   — t          ¦   «          | j        j        S r!   )r°  r›  r   r.   s    r'   r   zTypedStorage.device¾  s   € å#Ñ%Ô%Ð%ØÔ$Ô+Ð+r)   c                óF   — t          ¦   «          |                      ¦   «         S r!   rç  r.   s    r'   rB   zTypedStorage.sizeÃ  rè  r)   c                ó^   — | j                              ¦   «         |                      ¦   «         z  S r!   )r›  r@   r:  r.   s    r'   rÉ  zTypedStorage._sizeÈ  s*   € ð Ô$×+Ò+Ñ-Ô-°×1CÒ1CÑ1EÔ1EÑEÐEr)   c                óF   — t          ¦   «          |                      ¦   «         S r!   )r°  Ú_pickle_storage_typer.   s    r'   Úpickle_storage_typez TypedStorage.pickle_storage_typeÍ  s    € Ý#Ñ%Ô%Ð%Ø×(Ò(Ñ*Ô*Ð*r)   c                óŒ   — 	 t          ¦   «         | j                 S # t          $ r}t          d| j        › d�¦  «        |‚d }~ww xY w)Nzdtype z is not recognized)r‘  rC   ÚKeyError)r$   Úes     r'   r)  z!TypedStorage._pickle_storage_typeÒ  s\   € ð	KÝ-Ñ/Ô/°´
Ô;Ð;øÝð 	Kð 	Kð 	KÝÐB D¤JÐBÐBÐBÑCÔCÈÐJøøøøð	Køøøs   ‚ ›
A¥>¾Ac                óŽ   — t          j        ¦   «         }t          j        | |d¬¦  «         t          |                     ¦   «         ffS r¿   rÁ   rÇ   s     r'   rÉ   zTypedStorage.__reduce__Ø  rÊ   r)   c                óF   — t          ¦   «          |                      ¦   «         S r!   )r°  Ú	_data_ptrr.   s    r'   rW   zTypedStorage.data_ptrÝ  s   € Ý#Ñ%Ô%Ð%Ø�~Š~ÑÔÐr)   c                ó4   — | j                              ¦   «         S r!   )r›  rW   r.   s    r'   r0  zTypedStorage._data_ptrâ  s   € ØÔ$×-Ò-Ñ/Ô/Ð/r)   c                óP   — t          ¦   «          | j                             ¦   «         S r!   )r°  r›  rY   r.   s    r'   rY   zTypedStorage.resizableå  s#   € Ý#Ñ%Ô%Ð%ØÔ$×.Ò.Ñ0Ô0Ð0r)   c                óL   — t          ¦   «          |                      |¦  «         d S r!   )r°  Ú_resize_ry   s     r'   rz   zTypedStorage.resize_é  s&   € Ý#Ñ%Ô%Ð%Ø�Š�dÑÔÐÐÐr)   c                ód   — | j                              ||                      ¦   «         z  ¦  «         d S r!   )r›  rz   r:  ry   s     r'   r4  zTypedStorage._resize_î  s0   € ØÔ×%Ò% d¨T×-?Ò-?Ñ-AÔ-AÑ&AÑBÔBÐBÐBÐBr)   c                ó$   — t          j        |i |¤ŽS r!   )r   rŠ   rf   s      r'   rŠ   zTypedStorage._free_weak_refñ  s   € åÔ,¨dÐ=°fÐ=Ð=Ð=r)   c                ó&   —  | j         j        |i |¤ŽS r!   )r›  r|   r#   s      r'   r|   zTypedStorage._weak_refõ  s   € Ø.ˆtÔ$Ô.°Ð?¸Ð?Ð?Ð?r)   c                ó8   — t          ¦   «           | j        |i |¤ŽS r!   )r°  Ú_from_bufferrf   s      r'   rg   zTypedStorage.from_bufferø  s&   € å#Ñ%Ô%Ð%ØˆsÔ Ð0¨Ð0Ð0Ð0r)   rÞ   c               ó¸  — | t           k    rj|€t          j        ¦   «         n|}t          j        |€dn|¦  «        }|j        dk    rt          d|j        › �¦  «        ‚t          j        j        |d|i|¤Ž}nT|€t          |¦  «        dk    rt          d¦  «        ‚|�t          d¦  «        ‚| j	        }t          j        j        |d|i|¤Ž}t          ||d¬¦  «        S )	NrØ   z3TypedStorage.from_buffer: Not available for device rC   é   zefrom_buffer: 'dtype' can only be specified in UntypedStorage.from_buffer and TypedStorage.from_bufferzffrom_buffer: 'device' can only be specified in UntypedStorage.from_buffer and TypedStorage.from_bufferTrÓ  )
r   rK   rÞ  r   rF   rÕ  r   rg   rª   rÄ  )r`   rC   r   r%   r&   r&  s         r'   r9  zTypedStorage._from_bufferý  s*  € à•,ÒÐØ16°•EÔ+Ñ-Ô-Ð-ÀEˆEÝ”\¨6¨> % %¸vÑFÔFˆFØŒ{˜eÒ#Ð#Ý"ØWÈ&Ì+ÐWÐWñô ð õ 5:Ô4HÔ4TØð5Ø"ð5Ø&,ð5ð 5ˆOˆOð
 Ð ¥C¨¡I¤I°¢N NÝ"ðNñô ð ð Ð!Ý"ðNñô ð ð
 ”JˆEÝ#Ô2Ô>ØðØ"ðØ&,ðð ˆOõ ¨ÀÐQUÐVÑVÔVÐVr)   c                ó¦  — t          |t          j        ¦  «        st          dt	          |¦  «        › �¦  «        ‚t          j        g | j        | j        ¬¦  «                             | ¦  «                             |¦  «         	                    ¦   «         }| 
                    ¦   «         |  
                    ¦   «         k    r|                     ¦   «         }|S rÝ   )rß   rK   rC   rà   rF   rá   r   rã   rL   rä   rW   r·   rå   s      r'   r   zTypedStorage._to  s¥   € Ý˜%¥¤Ñ-Ô-ð 	XÝÐVÍÈeÉÌÐVÐVÑWÔWÐWåŒL˜ 4¤:°d´kÐBÑBÔBßŠT�$‰ZŒZßŠR�‰YŒYßŠ^ÑÔð	 	ð ×ÒÑÔ §¢¡¤Ò0Ð0Ø—m’m‘o”oˆGØˆr)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S rê   )r°  r   rK   rë   r.   s    r'   rë   zTypedStorage.double*  ó"   € å#Ñ%Ô%Ð%Ø�xŠx�œÑ%Ô%Ð%r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S rî   )r°  r   rK   rï   r.   s    r'   rï   zTypedStorage.float/  ó"   € å#Ñ%Ô%Ð%Ø�xŠx�œÑ$Ô$Ð$r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S rò   )r°  r   rK   ró   r.   s    r'   ró   zTypedStorage.half4  ó"   € å#Ñ%Ô%Ð%Ø�xŠx�œ
Ñ#Ô#Ð#r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S rö   )r°  r   rK   r÷   r.   s    r'   r÷   zTypedStorage.long9  rB  r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S rù   )r°  r   rK   rú   r.   s    r'   rú   zTypedStorage.int>  s"   € å#Ñ%Ô%Ð%Ø�xŠx�œ	Ñ"Ô"Ð"r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S rü   )r°  r   rK   rý   r.   s    r'   rý   zTypedStorage.shortC  r@  r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S rÿ   )r°  r   rK   r   r.   s    r'   r  zTypedStorage.charH  rB  r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   râ   r.   s    r'   r  zTypedStorage.byteM  r@  r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   r  r.   s    r'   r  zTypedStorage.boolR  rB  r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r	  )r°  r   rK   r
  r.   s    r'   r
  zTypedStorage.bfloat16W  s"   € å#Ñ%Ô%Ð%Ø�xŠx�œÑ'Ô'Ð'r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   r  r.   s    r'   r  zTypedStorage.complex_double\  s"   € å#Ñ%Ô%Ð%Ø�xŠx�œÑ&Ô&Ð&r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   r  r.   s    r'   r  zTypedStorage.complex_floata  r>  r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   r  r.   s    r'   r  zTypedStorage.float8_e5m2f  s#   € å#Ñ%Ô%Ð%Ø�xŠx�Ô)Ñ*Ô*Ð*r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   r  r.   s    r'   r  zTypedStorage.float8_e4m3fnk  s#   € å#Ñ%Ô%Ð%Ø�xŠx�Ô+Ñ,Ô,Ð,r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   r  r.   s    r'   r  zTypedStorage.float8_e5m2fnuzp  ó#   € å#Ñ%Ô%Ð%Ø�xŠx�Ô-Ñ.Ô.Ð.r)   c                ó\   — t          ¦   «          |                      t          j        ¦  «        S r  )r°  r   rK   r  r.   s    r'   r  zTypedStorage.float8_e4m3fnuzu  rO  r)   c                óð   — t          ¦   «          | t          k    rt          d¦  «        ‚t                               |||t
          j                             | j        ¦  «        z  ¦  «        } | |¬¦  «        }|S )a²  from_file(filename, shared=False, size=0) -> Storage

        Creates a CPU storage backed by a memory-mapped file.

        If ``shared`` is ``True``, then memory is shared between all processes.
        All changes are written to the file. If ``shared`` is ``False``, then the changes on
        the storage do not affect the file.

        ``size`` is the number of elements in the storage. If ``shared`` is ``False``,
        then the file must contain at least ``size * sizeof(Type)`` bytes
        (``Type`` is the type of storage). If ``shared`` is ``True`` the file will be created if needed.

        Args:
            filename (str): file name to map
            shared (bool): whether to share memory (whether ``MAP_SHARED`` or ``MAP_PRIVATE`` is passed to the
                            underlying `mmap(2) call <https://man7.org/linux/man-pages/man2/mmap.2.html>`_)
            size (int): number of elements in the storage
        z/from_file can only be called on derived classesrä  )	r°  r   rÕ  r   r’   rK   r9  r:  rC   )r`   r�   r‘   rB   r&  ræ   s         r'   r’   zTypedStorage.from_filez  sv   € õ( 	$Ñ%Ô%Ð%Ø•,ÒÐÝÐPÑQÔQÐQÝ(×2Ò2Ø�f˜d¥U¤\×%?Ò%?ÀÄ	Ñ%JÔ%JÑJñ
ô 
ˆð �# ?Ð3Ñ3Ô3ˆØˆr)   c                ó$   — t          j        |i |¤ŽS r!   )r   r”   rf   s      r'   r”   zTypedStorage._expired—  s   € åÔ&¨Ð7°Ð7Ð7Ð7r)   c                ó&   —  | j         j        |i |¤ŽS r!   )r›  rw   r#   s      r'   rw   zTypedStorage._write_file›  s   € Ø0ˆtÔ$Ô0°$ÐA¸&ÐAÐAÐAr)   c                ó&   —  | j         j        |i |¤ŽS r!   )r›  r~   r#   s      r'   r~   zTypedStorage._set_from_filež  ó   € Ø3ˆtÔ$Ô3°TÐD¸VÐDÐDÐDr)   c                ó&   —  | j         j        |i |¤ŽS r!   )r›  r€   r#   s      r'   r€   zTypedStorage._set_cdata¡  s   € Ø/ˆtÔ$Ô/°Ð@¸Ð@Ð@Ð@r)   c                ó&   —  | j         j        |i |¤ŽS r!   )r›  r‚   r#   s      r'   r‚   zTypedStorage._share_cuda_¤  s   € Ø1ˆtÔ$Ô1°4ÐB¸6ÐBÐBÐBr)   c                óF   — t          ¦   «          |                      ¦   «         S r!   )r°  Ú
_is_sharedr.   s    r'   r„   zTypedStorage.is_shared§  s   € Ý#Ñ%Ô%Ð%Ø�ŠÑ Ô Ð r)   c                ó4   — | j                              ¦   «         S r!   )r›  r„   r.   s    r'   rY  zTypedStorage._is_shared¬  s   € ØÔ$×.Ò.Ñ0Ô0Ð0r)   c                ó.   — t          j        j        |i |¤ŽS r!   )rK   r   r†   rf   s      r'   r†   zTypedStorage._new_shared_cuda¯  s   € åÔ#Ô4°dÐE¸fÐEÐEÐEr)   c                ób   —  | j         j        |i |¤Ž\  }}}||||                      ¦   «         z  fS r!   )r›  r[   r:  )r$   r%   r&   Úmanager_handleÚstorage_handlerB   s         r'   r[   z!TypedStorage._share_filename_cpu_³  sH   € ð
 7ˆDÔ!Ô6¸ÐGÀÐGÐGñ		
ØØØà˜~¨t°t×7IÒ7IÑ7KÔ7KÑ/KÐKÐKr)   c                ó8   — | j                              ¦   «          | S r!   )r›  ru   r.   s    r'   ru   zTypedStorage._shared_decref»  s   € ØÔ×,Ò,Ñ.Ô.Ð.Øˆr)   c               ó.   — t          j        j        |i |¤ŽS r!   ©rK   r   rn   ro   s       r'   rp   z!TypedStorage._release_ipc_counter¿  ó   € åÔ#Ô=¸tÐNÀvÐNÐNÐNr)   c                ó&   —  | j         j        |i |¤ŽS r!   )r›  rˆ   r#   s      r'   rˆ   zTypedStorage._shared_increfÃ  rU  r)   c                ó^   —  | j         j        |i |¤Ž\  }}|||                      ¦   «         z  fS r!   )r›  r]   r:  )r$   r%   r&   ÚfdrB   s        r'   r]   zTypedStorage._share_fd_cpu_Æ  s<   € Ø7�4Ô(Ô7¸ÐHÀÐHÐH‰ˆˆDØ�4˜4×-Ò-Ñ/Ô/Ñ/Ð/Ð/r)   c                ór  — | j         t          ¦   «         vrd S t          ¦   «         | j                  }| j        j        dddt          j                             ¦   «         fvrd S | j        j        dk    rt          nt          t          | j        j        ¦  «        }	 t          ||¦  «        S # t          $ r Y d S w xY w)NrØ   rH   rP   )	rC   r‘  r   rF   rK   r.  r/  ÚgetattrÚAttributeError)r$   Ústorage_namerº  s      r'   r  z&TypedStorage._get_legacy_storage_classÊ  sÈ   € ØŒ:Õ7Ñ9Ô9Ð9Ð9Ø�4å1Ñ3Ô3°D´JÔ?ˆàŒ;ÔØØØÝŒH×2Ò2Ñ4Ô4ð	$
ð 
ð 
ð �4ð ”[Ô%¨Ò.Ð.�EˆEµG½EÀ4Ä;ÔCSÑ4TÔ4Tð 	ð	Ý˜6 <Ñ0Ô0Ð0øÝð 	ð 	ð 	Ø�4�4ð	øøøs   ÂB( Â(
B6Â5B6rB  rA  )Fr!   )r7   r   r8   rú  r@  )rC   rD   r8   r  r*   rÿ  )r   r   r8   r  r*   r
   r?  rC  rD  )arE  rF  rG  r   rH  r   rJ  rÄ  r�   rË  rÖ  r(   rŒ   rŽ   r5  rå  r/   rî  r6   rÇ  r4   rô  r<   r@   rý  rF   rH   rP   rL   rR   r:  rU   r  r°   rµ   r¸   r½   r  rÍ   r·   rÕ   rØ   r"  r%  r0  r!  r3  r   r   rB   rÉ  r*  r)  rÉ   rW   r0  rY   rz   r4  rI  rŠ   r|   rg   r9  r   rë   rï   ró   r÷   rú   rý   r  r  r  r
  r  r  r  r  r  r  r’   r”   rw   r~   r€   r‚   r„   rY  r†   r[   ru   rp   rˆ   r]   r  rK  rL  s   @r'   r   r   Ÿ  s?  ø€ € € € € € Ø€IÐÐÐÑà,0€LÐ0Ð0Ð0Ñ0àÐÐÑàðð ñ „Xðð ð.ð .ð .ñ „Xð.ð
ð ð ð ØØØðZð Zð Zð Zð Zð Zð Zð~ ØØØðYVð YVð YVð YVð YVðv ð;ð ;ñ „Xð;ð ð:ð :ñ „Xð:ð%ð %ð %ð
<ð <ð <ð <ðð ð ð*ð *ð *ð *ð4)ð )ð )ð! ð ! ð ! ðF"ð "ð "ð*2ð *2ð *2ðXð ð ð ð ðð ð ð
.ð .ð .ð
 !%Ø"ðCð Cð Cð Cð Cð"7ð 7ð 7ð 7ð 7ð6ð 6ð 6ð 6ð 6ð BGð 5ð 5ð 5ð 5ð 5ð 5ð"$ð $ð $ð
6ð 6ð 6ð2ð 2ð 2ð 2ð
.ð 
.ð 
.ðð ð ð9ð 9ð 9ðKð Kð Kð$ð $ð $ð
Uð Uð Uð4ð 4ð 4ð 4ð 4ðHð Hð Hð
ð ð ð
Fð Fð Fð
7ð 7ð 7ð 7ð 7ð
ð 
ð 
ð 
ð 
ð%ð %ð %ðð ð ð +/ð 

ð 

ð 

ð 

ð 

ð ð,ð ,ñ „Xð,ð ð,ð ,ñ „Xð,ðð ð ð
Fð Fð Fð
+ð +ð +ð
Kð Kð Kð3ð 3ð 3ð
 ð  ð  ð
0ð 0ð 0ð1ð 1ð 1ðð ð ð
Cð Cð Cð ð>ð >ñ „[ð>ð@ð @ð @ð ð1ð 1ñ „[ð1ð Ø'+°Dð Wð Wð Wð Wñ „[ðWð>ð ð ð&ð &ð &ð
%ð %ð %ð
$ð $ð $ð
$ð $ð $ð
#ð #ð #ð
%ð %ð %ð
$ð $ð $ð
%ð %ð %ð
$ð $ð $ð
(ð (ð (ð
'ð 'ð 'ð
&ð &ð &ð
+ð +ð +ð
-ð -ð -ð
/ð /ð /ð
/ð /ð /ð
 ðð ñ „[ðð8 ð8ð 8ñ „[ð8ðBð Bð BðEð Eð EðAð Að AðCð Cð Cð!ð !ð !ð
1ð 1ð 1ð ðFð Fñ „[ðFðLð Lð Lðð ð ð Ø04ð Oð Oð Oð Oñ „[ðOðEð Eð Eð0ð 0ð 0ðð ð ð ð ð ð r)   c                  ó    — e Zd ZU ded<   d„ ZdS )Ú_LegacyStorageMetarÂ  rC   c                óž   — t          |¦  «        t          k    r4t          | j        ¦  «        }||j        j         k    o| j        |j        k    S dS r@  )rF   r   rÀ  rF  r   rC   )r`   ÚinstancerÛ  s      r'   Ú__instancecheck__z$_LegacyStorageMeta.__instancecheck__ë  sL   € Ý�‰>Œ>�\Ò)Ð)Ý0°´Ñ@Ô@ˆJØ (¤/Ô"6Ò6ð Ø”	˜Xœ^Ò+ðð ˆur)   N)rE  rF  rG  rH  rn  r"   r)   r'   rk  rk  è  s1   € € € € € € ØÐÐÑðð ð ð ð r)   rk  c                  óP   — e Zd Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         ZdS )rÔ  c                ó’   — t           j                             | | ¦   «                              ¦   «         z  ¦  «        } | |¬¦  «        S )r2  rä  )rK   r   r3  r:  )r`   rB   r&  s      r'   r3  z_LegacyStorage._new_sharedõ  sD   € õ  Ô.×:Ò:¸4À#À#Á%Ä%×BUÒBUÑBWÔBWÑ;WÑXÔXˆØˆs Ð0Ñ0Ô0Ð0r)   c                ó.   — t          j        j        |i |¤ŽS r!   ra  rf   s      r'   rp   z#_LegacyStorage._release_ipc_counterû  rb  r)   c                ó¦   — |t           j                             | j        ¦  «        z  } | t           j                             |||¦  «        ¬¦  «        S )Nrä  )rK   r9  r:  rC   r   rk   )r`   ri   rj   rB   Ú
bytes_sizes        r'   Ú_new_shared_filenamez#_LegacyStorage._new_shared_filenameÿ  sT   € à�EœL×6Ò6°s´yÑAÔAÑAˆ
ØˆsÝÔ-×FÒFØ˜˜jñô ð
ñ 
ô 
ð 	
r)   N)rE  rF  rG  rI  r3  rp   rt  r"   r)   r'   rÔ  rÔ  ô  sf   € € € € € Øð1ð 1ñ „[ð1ð
 ðOð Oñ „[ðOð ð
ð 
ñ „[ð
ð 
ð 
r)   rÔ  )Ú	metaclassr*  c                óx   — 	 t          ¦   «         |          S # t          $ r}t          d| › d�¦  «        |‚d }~ww xY w)Nzpickle storage type "z" is not recognized)r˜  r,  )r*  r-  s     r'   Ú#_get_dtype_from_pickle_storage_typerw  	  s\   € ðÝ)Ñ+Ô+Ð,?Ô@Ð@øÝð ð ð ÝØLÐ$7ÐLÐLÐLñ
ô 
àð	øøøøðøøøs   ‚ –
9 4´9)r7  )rº  r£   )r*  r£   )AÚ
__future__r   r×  r  rY  rÂ   rP  r´  Útypingr   r   r   Ú	_Optionalr   r   r	   Útyping_extensionsr
   rK   Útorch._utilsr   r   Útorch.typesr   r   r   Útorch._prims_commonr   Ú__all__Únumpyr¢  r¡  ÚModuleNotFoundErrorÚLockrO  r   rH  r   r   r[  r.  ÚStorageBaser   rÅ   Úcacherx  r‘  r˜  rŸ  r¥  r§  r¨  r«  r°  r¹  rÀ  r   Ú__doc__rF   rH   rP   rL   rk  rÔ  rw  r"   r)   r'   ú<module>r†     sÇ  ðð #Ð "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø €€€Ø Ð Ð Ð Ø 	€	€	€	Ø Ð Ð Ð Ø €€€Ø RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RØ "Ð "Ð "Ð "Ð "Ð "à €€€Ø #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,ð ð 3Ø2Ð2Ð2Ð2Ð2Ð2ð Ð+Ð
,€ðØÐÐÐà€I€IøØð ð ð Ø€IØ	€B€B€Bðøøøð
 $�Y”^Ñ%Ô%Ð Ø02Ð Ð 2Ð 2Ð 2Ñ 2à€GˆCÐ:Ð;Ñ;Ô;€ðB"ð B"ð B"ð B"ð B"ñ B"ô B"ð B"ðJ!ð !ð !ðH@=ð @=ð @=ð @=ð @=�U”XÔ)¨<ñ @=ô @=ð @=ðF9ð 9ð 9ð „ðð ñ „ðð, „ðð ñ „ðð6 „ðð ñ „ðð
8ð 8ð 8ð2"ð "ð "ð &+Ð "ð.ð .ð .ð5ð 5ð 5ðBð Bð Bð Bð(?ð ?ð ?ðð ð ð ð@ð @ð @ð @ð @ñ @ô @ð @ðF "œM€Ô Ô Ø(Ô-Ô5€Ô Ô Ø'Ô+Ô3€Ô Ô Øœ+€„Ô ð	ð 	ð 	ð 	ð 	˜ñ 	ô 	ð 	ð
ð 
ð 
ð 
ð 
�\Ð-?ð 
ñ 
ô 
ð 
ð*ð ð ð ð ð s   ÁA  Á 	A,Á+A,