Ë
    øÿæiœÍ  ã                  óf  — 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 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 ej<                  «       Zi Z de!d<    edd¬«      Z" G d„ d«      Z#d„ Z$ G d„ d	ejJ                  jL                  e#«      Z'd„ Z(ejR                  d„ «       Z*ejR                  d„ «       Z+ejR                  d„ «       Z,d„ Z-d„ Z.da/d„ Z0d„ Z1d'd„Z2d„ Z3d(d„Z4 G d „ d«      Z5ejl                  e5jn                  _6        e#jp                  jl                  e5jp                  _6        e#jr                  jl                  e5jr                  _6        ejl                  e5jt                  _6         G d!„ d"e7«      Z; G d#„ d$e5e;¬%«      Z<d)d&„Z=y# e$ r dZdZY �ŒTw xY w)*é    )ÚannotationsN)ÚAnyÚcastÚTYPE_CHECKINGÚTypeVar)ÚSelf)Ú_toÚ_type)Ú_boolÚ_intÚStorage)ÚDeviceLikeTypeÚTypedStorageÚUntypedStorageTFzdict[int, threading.RLock]Ú_share_memory_mapÚTú_StorageBase | TypedStorage)Úboundc                  ó"  ‡ — 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d]d„Z	d„ Z
d„ Zd^d_d„Zd`d„Zd]d„Zd]d„Z	 da	 	 	 	 	 dbd„Zdad`d„Zdad`d„Zd]d„Zd]d„Zd]d„Zdcd„Zd„ Zd„ Zeddd„«       Zeddd „«       Zeded!„«       Zed	d	d"œ	 ded#„«       Zed	d$œd%„«       Zeded&„«       Zeded'„«       Z d`d(„Z!d)„ Z"dfd*„Z#d`d+„Z$d,„ Z%d-„ Z&d.„ Z'dcd/„Z(eded0„«       Z)d1„ Z*ed2„ «       Z+e,d3„ «       Z-e,d4„ «       Z.ed`d5„«       Z/ed`d6„«       Z0d7„ Z1dgd8„Z2d9„ Z3d:„ Z4d;„ Z5d<„ Z6d=„ Z7ˆ fd>„Z8d?„ Z9d@„ Z:dA„ Z;dB„ Z<dC„ Z=ddDœdhdE„Z>dF„ Z?dG„ Z@dH„ ZAdI„ ZBdJ„ ZCdK„ ZDdL„ ZEdM„ ZFdN„ ZGdO„ ZHdP„ ZIdQ„ ZJdR„ ZKdS„ ZLdT„ ZMdU„ ZNdidjdV„ZOdidjdW„ZPdX„ ZQedYd$œdZ„«       ZRd[„ ZSd\„ ZTˆ xZUS )kÚ_StorageBaser   Ú_cdataFr   Ú	is_sparseÚis_sparse_csrztorch.deviceÚdeviceNútorch.device | NoneÚ_fake_devicez
int | NoneÚ_checkpoint_offsetc                 ó   — y ©N© ©ÚselfÚargsÚkwargss      úb/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/torch/storage.pyÚ__init__z_StorageBase.__init__5   s   € Øó    c                ó   — t         ‚r   ©ÚNotImplementedError©r"   s    r%   Ú__len__z_StorageBase.__len__8   ó   € Ü!Ð!r'   c                ó   — t         ‚r   r)   ©r"   Úidxs     r%   Ú__getitem__z_StorageBase.__getitem__;   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú__setitem__z_StorageBase.__setitem__>   r-   r'   c                ó   — t         ‚r   r)   ©r"   ÚsourceÚnon_blockings      r%   Úcopy_z_StorageBase.copy_A   r-   r'   c                ó   — t         ‚r   r)   r+   s    r%   Únewz_StorageBase.newD   r-   r'   c                ó   — t         ‚r   r)   r+   s    r%   Únbytesz_StorageBase.nbytesG   r-   r'   c                ó"   — | j                  «       S r   )r<   r+   s    r%   Úsizez_StorageBase.sizeJ   s   € Ø�{‰{‹}Ðr'   c                ó   — t        | ||«      S r   )r
   )r"   Údtyper7   s      r%   Útypez_StorageBase.typeM   s   € ô �T˜5 ,Ó/Ð/r'   c                ó‚   — |rt        j                  d|«      nt        j                  d«      }| j                  ||¬«      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   r7   ©Útorchr   Úto©r"   r   r7   Údevice2s       r%   rC   z_StorageBase.cudaR   s4   € ñ 39”%—,‘,˜v vÔ.¼e¿l¹lÈ6Ó>RˆØ�w‰w˜g°LˆwÓAÐAr'   c                ó‚   — |rt        j                  d|«      nt        j                  d«      }| j                  ||¬«      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.
        ÚhpurD   rE   rH   s       r%   rK   z_StorageBase.hpua   s4   € ñ 28”%—,‘,˜u fÔ-¼U¿\¹\È%Ó=PˆØ�w‰w˜g°LˆwÓAÐAr'   c                ó   — t         ‚r   r)   r+   s    r%   Úelement_sizez_StorageBase.element_sizep   r-   r'   c                ó.   — | j                   j                  S r   )r   Úindexr+   s    r%   Ú
get_devicez_StorageBase.get_devices   s   € Ø�{‰{× Ñ Ð r'   c                ó   — t         ‚r   r)   r+   s    r%   Údata_ptrz_StorageBase.data_ptrv   r-   r'   c                ó   — t         ‚r   r)   r+   s    r%   Ú	resizablez_StorageBase.resizabley   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú_share_filename_cpu_z!_StorageBase._share_filename_cpu_}   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú_share_fd_cpu_z_StorageBase._share_fd_cpu_€   r-   r'   c                ó   — t         ‚r   r)   ©Úclsr>   s     r%   Ú_new_using_filename_cpuz$_StorageBase._new_using_filename_cpuƒ   ó   € ä!Ð!r'   c                ó   — t         ‚r   r)   rZ   s     r%   Ú_new_using_fd_cpuz_StorageBase._new_using_fd_cpu‡   r]   r'   c                ó   — t         ‚r   r)   ©r[   r#   r$   s      r%   Úfrom_bufferz_StorageBase.from_buffer‹   r]   r'   )r   r@   c               ó   — t         ‚r   r)   )r[   ÚmanagerÚobjr>   r   r@   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)   ra   s      r%   ri   z&_StorageBase._release_ipc_counter_cudaŸ   r]   r'   c                ó   — t         ‚r   r)   ra   s      r%   Ú_new_with_weak_ptrz_StorageBase._new_with_weak_ptr£   r]   r'   c                ó   — t         ‚r   r)   r+   s    r%   Ú_shared_decrefz_StorageBase._shared_decref§   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú_write_filez_StorageBase._write_fileª   r-   r'   c                ó   — t         ‚r   r)   ©r"   r>   s     r%   Úresize_z_StorageBase.resize_­   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú	_weak_refz_StorageBase._weak_ref°   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú_set_from_filez_StorageBase._set_from_file³   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú
_set_cdataz_StorageBase._set_cdata¶   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú_share_cuda_z_StorageBase._share_cuda_¹   r-   r'   c                ó   — t         ‚r   r)   r+   s    r%   Ú	is_sharedz_StorageBase.is_shared¼   r-   r'   c                ó   — t         ‚r   r)   ra   s      r%   Ú_new_shared_cudaz_StorageBase._new_shared_cuda¿   r]   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú_shared_increfz_StorageBase._shared_increfÃ   r-   r'   c                ó   — t         ‚r   r)   ra   s      r%   Ú_free_weak_refz_StorageBase._free_weak_refÆ   r]   r'   c                ó   — t         ‚r   r)   r+   s    r%   Úis_cudaz_StorageBase.is_cudaÊ   r]   r'   c                ó   — t         ‚r   r)   r+   s    r%   Úis_hpuz_StorageBase.is_hpuÎ   r]   r'   c                ó   — t         ‚r   r)   )r[   ÚfilenameÚsharedr<   s       r%   Ú	from_filez_StorageBase.from_fileÒ   r]   r'   c                ó   — t         ‚r   r)   ra   s      r%   Ú_expiredz_StorageBase._expiredÖ   r]   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú	_byteswapz_StorageBase._byteswapÚ   r-   r'   c                ó   — t         ‚r   r)   r!   s      r%   Ú_get_filenamez_StorageBase._get_filenameÝ   r-   r'   c                ó  ‡ — dt        j                  ‰ «      › d‰ j                  › dt        ‰ «      › d�}‰ j                  j                  dk(  rd|z   S ddj                  ˆ fd	„t        ‰ j                  «       «      D «       «      z   }|d
z   |z   S )NÚ[z(device=ú
) of size Ú]Úmetaú...
Ú ú
 c              3  ó:   •K  — | ]  }t        ‰|   «      –— Œ y ­wr   ©Ústr©Ú.0Úir"   s     €r%   Ú	<genexpr>z(_StorageBase.__repr__.<locals>.<genexpr>ä   s   øè ø€ Ð#MÑ:L°Q¤C¨¨Q©§LÑ:Lùó   ƒÚ
)rF   Útypenamer   ÚlenrA   ÚjoinÚranger>   ©r"   Úinfo_strÚdata_strs   `  r%   Ú__repr__z_StorageBase.__repr__à   s�   ø€ Ø”u—~‘~ dÓ+Ð,¨H°T·[±[°MÀÌCÐPTËIÈ;ÐVWÐXˆØ�;‰;×Ñ˜vÒ%Ø˜XÑ%Ð%Ø˜Ÿ™Ó#M¼%ÀÇ	Á	ÃÔ:LÓ#MÓMÑMˆØ˜$‰ Ñ)Ð)r'   c                óZ   ‡ — t        ˆ fd„t        ‰ j                  «       «      D «       «      S )Nc              3  ó(   •K  — | ]	  }‰|   –— Œ y ­wr   r    rŸ   s     €r%   r¢   z(_StorageBase.__iter__.<locals>.<genexpr>è   ó   øè ø€ Ð8Ñ%7 �D˜•GÑ%7ùó   ƒ)Úiterr¨   r>   r+   s   `r%   Ú__iter__z_StorageBase.__iter__ç   s   ø€ ÜÓ8¤U¨4¯9©9«;Ô%7Ó8Ó8Ð8r'   c                ó"   — | j                  «       S r   )Úcloner+   s    r%   Ú__copy__z_StorageBase.__copy__ê   s   € Ø�z‰z‹|Ðr'   c                ó¢   — |j                  di «      }| j                  |v r|| j                     S | j                  «       }||| j                  <   |S )NrF   )Ú
setdefaultr   r´   )r"   ÚmemoÚnew_storages      r%   Ú__deepcopy__z_StorageBase.__deepcopy__í   sL   € Ø�‰˜w¨Ó+ˆØ�;‰;˜$ÑØ˜Ÿ™Ñ$Ð$Ø—j‘j“lˆØ'ˆˆT�[‰[ÑØÐr'   c                óˆ   — t        j                  «       }t        j                  | |d¬«       t        |j                  «       ffS ©NF)Ú_use_new_zipfile_serialization©ÚioÚBytesIOrF   ÚsaveÚ_load_from_bytesÚgetvalue©r"   Úbs     r%   Ú
__reduce__z_StorageBase.__reduce__õ   ó0   € Ü�J‰J‹LˆÜ�
‰
�4˜¸5ÕAÜ  1§:¡:£< /Ð2Ð2r'   c                óB   •— t         ‰| �  «       | j                  «       z   S r   )ÚsuperÚ
__sizeof__r>   ©r"   Ú	__class__s    €r%   rÊ   z_StorageBase.__sizeof__ú   s   ø€ Ü‰wÑ!Ó# d§i¡i£kÑ1Ð1r'   c                óv   —  t        | «      | j                  «       | j                  ¬«      j                  | «      S )úReturn a copy of this storage.rg   )rA   r<   r   r8   r+   s    r%   r´   z_StorageBase.cloneý   s*   € àŒt�D‹z˜$Ÿ+™+›-°·±Ô<×BÑBÀ4ÓHÐHr'   c                ó   — t        | «      S ©z6Return a list containing the elements of this storage.)Úlistr+   s    r%   Útolistz_StorageBase.tolist  s   € ä�D‹zÐr'   c                óž   — | j                   j                  dk7  r3t        j                  | j	                  «       «      j                  | d«      S | S )úAReturn a CPU copy of this storage if it's not already on the CPU.ÚcpuF©r   rA   rF   r   r>   r8   r+   s    r%   rÕ   z_StorageBase.cpu  s=   € à�;‰;×Ñ˜uÒ$Ü×'Ñ'¨¯	©	«Ó4×:Ñ:¸4ÀÓGÐGØˆr'   c                ó¢   — | j                   j                  dk7  r5t        j                  | j	                  «       d¬«      j                  | d«      S | S )zAReturn a MPS copy of this storage if it's not already on the MPS.Úmpsrg   FrÖ   r+   s    r%   rØ   z_StorageBase.mps  s?   € à�;‰;×Ñ˜uÒ$Ü×'Ñ'¨¯	©	«¸EÔB×HÑHÈÈuÓUÐUØˆr'   c                óž  — t        |t        j                  «      st        dt	        |«      › �«      ‚t        j
                  g t        j                  | j                  ¬«      j                  t        t        | «      «      j                  |«      j                  «       }|j                  «       | j                  «       k(  r|j                  «       }|S ©Nz*Argument 'dtype' must be torch.dtype, not ©r@   r   )Ú
isinstancerF   r@   Ú	TypeErrorrA   ÚtensorÚuint8r   Úset_r   r   rG   Ú_typed_storagerR   r´   ©r"   r@   Ústorages      r%   r	   z_StorageBase._to  s�   € Ü˜%¤§¡Ô-ÜÐHÌÈeËÈÐVÓWÐWä�L‰L˜¤5§;¡;°t·{±{ÔCß‰T”$”w Ó%Ó&ß‰R�‹Yß‰^Óð	 	ð ×ÑÓ §¡£Ò0Ø—m‘m“oˆGØˆr'   ©r7   c               óz   — t        |t        j                  «      st        j                  |«      }t        | ||«      S r   )rÜ   rF   r   r	   )r"   r   r7   s      r%   rG   z_StorageBase.to  s-   € Ü˜&¤%§,¡,Ô/Ü—\‘\ &Ó)ˆFÜ�4˜ Ó.Ð.r'   c                ó@   — | j                  t        j                  «      S ©z"Casts this storage to double type.)r	   rF   Údoubler+   s    r%   rè   z_StorageBase.double#  ó   € à�x‰xœŸ™Ó%Ð%r'   c                ó@   — | j                  t        j                  «      S ©z!Casts this storage to float type.)r	   rF   Úfloatr+   s    r%   rì   z_StorageBase.float'  ó   € à�x‰xœŸ™Ó$Ð$r'   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to half type.)r	   rF   Úhalfr+   s    r%   rð   z_StorageBase.half+  ó   € à�x‰xœŸ
™
Ó#Ð#r'   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to long type.)r	   rF   Úlongr+   s    r%   rô   z_StorageBase.long/  rñ   r'   c                ó@   — | j                  t        j                  «      S ©zCasts this storage to int type.)r	   rF   Úintr+   s    r%   r÷   z_StorageBase.int3  s   € à�x‰xœŸ	™	Ó"Ð"r'   c                ó@   — | j                  t        j                  «      S ©z!Casts this storage to short type.)r	   rF   Úshortr+   s    r%   rú   z_StorageBase.short7  rí   r'   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to char type.)r	   rF   Úint8r+   s    r%   Úcharz_StorageBase.char;  rñ   r'   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to byte type.)r	   rF   rß   r+   s    r%   Úbytez_StorageBase.byte?  rí   r'   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to bool type.)r	   rF   Úboolr+   s    r%   r  z_StorageBase.boolC  rñ   r'   c                ó@   — | j                  t        j                  «      S ©z$Casts this storage to bfloat16 type.)r	   rF   Úbfloat16r+   s    r%   r  z_StorageBase.bfloat16G  s   € à�x‰xœŸ™Ó'Ð'r'   c                ó@   — | j                  t        j                  «      S ©z*Casts this storage to complex double type.)r	   rF   Úcdoubler+   s    r%   Úcomplex_doublez_StorageBase.complex_doubleK  s   € à�x‰xœŸ™Ó&Ð&r'   c                ó@   — | j                  t        j                  «      S ©z)Casts this storage to complex float type.)r	   rF   Úcfloatr+   s    r%   Úcomplex_floatz_StorageBase.complex_floatO  ré   r'   c                ó@   — | j                  t        j                  «      S ©z&Casts this storage to float8_e5m2 type)r	   rF   Úfloat8_e5m2r+   s    r%   r  z_StorageBase.float8_e5m2S  s   € à�x‰xœ×)Ñ)Ó*Ð*r'   c                ó@   — | j                  t        j                  «      S ©z(Casts this storage to float8_e4m3fn type)r	   rF   Úfloat8_e4m3fnr+   s    r%   r  z_StorageBase.float8_e4m3fnW  s   € à�x‰xœ×+Ñ+Ó,Ð,r'   c                ó@   — | j                  t        j                  «      S ©z*Casts this storage to float8_e5m2fnuz type)r	   rF   Úfloat8_e5m2fnuzr+   s    r%   r  z_StorageBase.float8_e5m2fnuz[  ó   € à�x‰xœ×-Ñ-Ó.Ð.r'   c                ó@   — | j                  t        j                  «      S ©z*Casts this storage to float8_e4m3fnuz type)r	   rF   Úfloat8_e4m3fnuzr+   s    r%   r  z_StorageBase.float8_e4m3fnuz_  r  r'   c                óº   — t        j                  g t         j                  | j                  ¬«      j	                  t        t        | «      «      j                  |«      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Û   )rF   rÞ   rß   r   rà   r   r   Ú	is_pinned©r"   r   s     r%   r  z_StorageBase.is_pinnedc  s<   € ô �L‰L˜¤5§;¡;°t·{±{ÔCß‰T”$”w Ó%Ó&ß‰Y�vÓð	
r'   c                óF  — | j                   j                  dk7  rt        d| j                  «       › d�«      ‚t        j                  g t        j
                  | j                   ¬«      j                  t        t        | «      «      j                  |«      }|j                  «       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   rA   rÝ   rF   rÞ   rß   rà   r   r   Ú
pin_memoryÚuntyped_storage)r"   r   Úpinned_tensors      r%   r!  z_StorageBase.pin_memorys  s|   € ð �;‰;×Ñ˜uÒ$Ü˜l¨4¯9©9«;¨-Ð7VÐWÓXÐXô �L‰L˜¤5§;¡;°t·{±{ÔCß‰T”$”w Ó%Ó&ß‰Z˜Óð 	ð
 ×,Ñ,Ó.Ð.r'   c                óÜ   — ddl m} | j                  j                  dt        j
                  j                  «       fv r	 | S  |«       dk(  r| j                  «        | S | j                  «        | S )ú.See :meth:`torch.UntypedStorage.share_memory_`r   ©Úget_sharing_strategyrC   Úfile_system)	Útorch.multiprocessingr'  r   rA   rF   Ú_CÚ_get_privateuse1_backend_namerV   rX   )r"   r'  s     r%   Úshare_memory_z_StorageBase.share_memory_‡  sf   € å>à�;‰;×Ñ ¬¯©×(NÑ(NÓ(PÐQÑQØð
 ˆñ	 "Ó# }Ò4Ø×%Ñ%Ô'ð ˆð ×ÑÔ!Øˆr'   rÕ   c               óþ   — ddl m} t        j                  |«      }|j                  dt        j
                  j                  «       dfv r
 | ||¬«      S  |«       dk(  r| j                  |«      S | j                  |«      S )ú>Create a new storage in shared memory with the same data type.r   r&  rC   rK   rg   r(  )	r)  r'  rF   r   rA   r*  r+  r\   r_   )r[   r>   r   r'  s       r%   Ú_new_sharedz_StorageBase._new_shared“  so   € õ 	?ä—‘˜fÓ%ˆØ�;‰;˜6¤5§8¡8×#IÑ#IÓ#KÈUÐSÑSÙ�t FÔ+Ð+Ù!Ó# }Ò4Ø×.Ñ.¨tÓ4Ð4à×(Ñ(¨Ó.Ð.r'   c                ó   — | S r   r    r+   s    r%   Úuntypedz_StorageBase.untyped   s   € Øˆr'   c                ó¬   — t         j                  j                  |«      }|j                  rt	        t        |dz  «      d«      }| j                  |«       y)zSwap bytes in underlying data.é   é   N)rF   Ú_utilsÚ_element_sizeÚ
is_complexÚmaxr÷   r‘   )r"   r@   Ú	elem_sizes      r%   Úbyteswapz_StorageBase.byteswap£  s@   € ä—L‘L×.Ñ.¨uÓ5ˆ	à×ÒÜœC 	¨A¡Ó.°Ó2ˆIØ�‰�yÕ!r'   ©Úreturnr   r   )r6   r   r7   z_bool | Noner<  r   )r<  r   ©NF)r@   ú
str | Noner7   r   r<  r   )r<  r   )r>   r   r<  r   ©r<  r   )r>   r   ©r<  r>  )r   r   r7   r   ©rC   ©r   zstr | torch.device)VÚ__name__Ú
__module__Ú__qualname__Ú__annotations__r   r   r   r   r&   r,   r1   r3   r8   r:   r<   r>   rA   rC   rK   rM   rP   rR   rT   rV   rX   Úclassmethodr\   r_   rb   rf   rk   ri   rn   rp   rr   ru   rw   ry   r{   r}   r   r�   rƒ   r…   Úpropertyr‡   r‰   r�   r�   r‘   r“   r¬   r²   rµ   rº   rÆ   rÊ   r´   rÒ   rÕ   rØ   r	   rG   rè   rì   rð   rô   r÷   rú   rþ   r  r  r  r  r  r  r  r  r  r  r!  r,  r/  r1  r:  Ú__classcell__©rÌ   s   @r%   r   r   )   sÃ  ø… ØƒKØ€IˆuÓØ €M�5Ó ØÓð )-€LÐ%Ó,à%)Ð˜
Ó)òó"ò"ò"ô"ó"ó"óð ?Dð0Øð0Ø6;ð0à	$ó0ô
BôBó"ó!ó"ó"ò"ò"ð ò"ó ð"ð ò"ó ð"ð ò"ó ð"ð ð Øñ	"ð 
ò	"ó ð	"ð Ø04ó >ó ð>ð ò"ó ð"ð ò"ó ð"ó"ò"ó"ó"ò"ò"ò"ó"ð ò"ó ð"ò"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ò"ó ð"ð ò"ó ð"ò"ó"ò*ò9òòò3ô
2òIòòòòð CHõ /ò
&ò%ò$ò$ò#ò%ò$ò%ò$ò(ò'ò&ò+ò-ò/ò/ô
ô /ò(
ð Ø).ó 
/ó ð
/òö"r'   r   c                óB   ‡ — t        j                  ‰ «      ˆ fd„«       }|S )Nc                óÖ  •— d }d }t         5  | j                  }|t        v r
t        |   }n4t        j                  «       t        |<   t        |   j                  «        |}d d d «       |�|5  	 d d d «       	  ‰| g|¢­i |¤Ž|�X| j                  |k7  rt        d|› d| j                  › �«      ‚t         5  t        |   j                  «        t        |= d d d «       S S # 1 sw Y   Œ~xY w# 1 sw Y   Œ|xY w# 1 sw Y   S xY w# |�d| j                  |k7  rt        d|› d| j                  › �«      ‚t         5  t        |   j                  «        t        |= d d d «       w # 1 sw Y   w xY ww xY w)Nz-storage cdata changed unexpectedly: expected z, got )Ú_share_memory_lockr   r   Ú	threadingÚRLockÚacquireÚAssertionErrorÚrelease)r"   r#   r$   Úto_freeÚto_waitÚkeyÚfns         €r%   Úwrapperz-_share_memory_lock_protected.<locals>.wrapper­  sp  ø€ àˆØˆÞØ—+‘+ˆCØÔ'Ñ'Ü+¨CÑ0‘ä)2¯©Ó):Ô! #Ñ&Ü! #Ñ&×.Ñ.Ô0Ø�÷  ð ÐÚØ÷ ð	3Ù�dÐ,˜TÒ, VÑ,ð Ð"ð —;‘; 'Ò)Ü(ØGÈÀyÐPVÐW[×WbÑWbÐVcÐdóð ö (Ü% gÑ.×6Ñ6Ô8Ü)¨'Ð2÷ (Ð'ð #÷)  Ðú÷ �ú÷ (Ð'ûð Ð"ð —;‘; 'Ò)Ü(ØGÈÀyÐPVÐW[×WbÑWbÐVcÐdóð ö (Ü% gÑ.×6Ñ6Ô8Ü)¨'Ð2÷ (×'Ñ'úð #úsH   ŒACÁ+C(Á6D  Â3C4ÃC%Ã(C1Ã4C=	Ä 3E(Ä3EÅ	E(ÅE$Å E()Ú	functoolsÚwraps)rV  rW  s   ` r%   Ú_share_memory_lock_protectedrZ  ¬  s&   ø€ Ü‡_�_�RÓó 3ó ð 3ðD €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                ój   •— | j                   j                  dk(  rt        d«      ‚t        ‰| �  |i |¤ŽS )Nr˜   ú$Not available for 'meta' device type)r   rA   r*   rÉ   r1   ©r"   r#   r$   rÌ   s      €r%   r1   zUntypedStorage.__getitem__Ô  s6   ø€ Ø�;‰;×Ñ˜vÒ%Ü%Ð&LÓMÐMÜ‰wÑ" DÐ3¨FÑ3Ð3r'   c                ó4   — | j                   j                  dk(  S ©NrC   ©r   rA   r+   s    r%   r‡   zUntypedStorage.is_cudaÙ  s   € à�{‰{×Ñ 6Ñ)Ð)r'   c                ó4   — | j                   j                  dk(  S ©NrK   ra  r+   s    r%   r‰   zUntypedStorage.is_hpuÝ  s   € à�{‰{×Ñ 5Ñ(Ð(r'   c                ó"   — | j                  «       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                ó"   •— t        ‰| �  |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É   r,  r^  s      €r%   r,  zUntypedStorage.share_memory_ê  s   ø€ ôB ‰wÑ$ dÐ5¨fÑ5Ð5r'   c                ó"   •— t        ‰| �  |i |¤ŽS r   )rÉ   rX   r^  s      €r%   rX   zUntypedStorage._share_fd_cpu_  s   ø€ ä‰wÑ% tÐ6¨vÑ6Ð6r'   c                ó"   •— t        ‰| �  |i |¤ŽS r   )rÉ   rV   r^  s      €r%   rV   z#UntypedStorage._share_filename_cpu_  s   ø€ ä‰wÑ+¨TÐ<°VÑ<Ð<r'   r@  )rC  rD  rE  r1   rH  r‡   r‰   r‹   rZ  r,  rX   rV   rI  rJ  s   @r%   r   r   Ó  s�   ø„ ô4ð
 ñ*ó ð*ð ñ)ó ð)ð ò$ó ð$ð "ó 6ó "ð 6ðD "ó7ó "ð7ð "ó=ó "ô=r'   c                óV   — t        j                  t        j                  | «      d¬«      S )NF)Úweights_only)rF   Úloadr¿   rÀ   )rÅ   s    r%   rÂ   rÂ     s   € Ü�:‰:”b—j‘j “m°%Ô8Ð8r'   c                 óÈ  — 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   )rF   r  r  r  r  Úfloat8_e8m0fnuÚfloat4_e2m1fn_x2Úbits8Úbits16Úbits1x8Úbits2x4Úbits4x2Ú	complex32Úuint16Úuint32Úuint64r    r'   r%   Ú_new_dtypesrw    sƒ   € ô
 	×ÑÜ×ÑÜ×ÑÜ×ÑÜ×ÑÜ×ÑÜ�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰ðð r'   c                 óH  — 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)rF   rè   rì   rð   rô   r÷   Úint16rý   rß   r  r  r
  r  Úqint8Úqint32Úquint8Úquint4x2Úquint2x4r    r'   r%   Ú_dtype_to_storage_type_mapr�  1  s  € ðÜ�‰�oðä�‰�^ðô 	�
‰
�Mðô 	�
‰
�Mð	ô
 	�	‰	�<ðô 	�‰�^ðô 	�
‰
�Mðô 	�‰�]ðô 	�
‰
�Mðô 	�‰Ð)ðô 	�‰Ð-ðô 	�‰Ð+ðô 	�‰�^ðô 	�‰�oðô 	�‰�oðô  	�‰Ð)ð!ô" 	�‰Ð)ð#ð r'   c                 óh   — t        «       j                  «       D � �ci c]  \  } }|| “Œ
 }} }|S c c}} w r   )r�  Úitems)rU  ÚvalÚ	dtype_maps      r%   Ú_storage_type_to_dtype_mapr•  M  s8   € ä*DÓ*F×*LÑ*LÔ*NÔOÑ*N™h˜c 3��c‘Ð*N€IÑOØÐùó Ps   œ.c           
     ól  — |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                  «       j                  S )NrÛ   )rF   r�  rŽ  r�  rŒ  r‹  rß   Úint32rý   rÞ   rá   Ú_untyped_storage)Úsequencer@   r   Úinterpret_dtypesÚ
tmp_tensors        r%   Ú_get_storage_from_sequencerœ  S  sÃ   € ØÜ�‰Ü�‰Ü�‰Ü�‰Ü�‰ðñ ô �L‰Lœ%Ÿ+™+Ü�N‰NœEŸK™KÜ�N‰NœEŸK™KÜ�L‰Lœ%Ÿ+™+Ü�K‰KœŸ™ð
Ðô —\‘\ØÐ,¨UÑ3¸Fô
‰
ô
 —\‘\ (°%ÀÔGˆ
à×$Ñ$Ó&×7Ñ7Ð7r'   c                ón   — t         r t        | t        t        j                  f«      S t        | t        «      S r   )Ú	HAS_NUMPYrÜ   r÷   ÚnpÚinteger)Úxs    r%   Ú_isintr¢  l  s(   € ÝÜ˜!œc¤2§:¡:Ð.Ó/Ð/ä˜!œSÓ!Ð!r'   c                 ó   — t         S r   )Ú"_always_warn_typed_storage_removalr    r'   r%   Ú&_get_always_warn_typed_storage_removalr¥  v  s   € Ü-Ð-r'   c                ój   — t        | t        «      s!t        dt        | «      j                  › �«      ‚| ay )Nzalways_warn must be bool, got )rÜ   r  rQ  rA   rC  r¤  )Úalways_warns    r%   Ú&_set_always_warn_typed_storage_removalr¨  z  s7   € ä�k¤4Ô(ÜØ,¬T°+Ó->×-GÑ-GÐ,HÐIó
ð 	
ð *5Ñ&r'   c                ó–   — d„ }t        «       s |«       r5d}t        j                  |t        | dz   ¬«       dt        j
                  d<   y y )Nc                 óL   — t        t        d«      sy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Øä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()r4  )Ú
stacklevelTr«  )r¥  ÚwarningsÚwarnÚUserWarningr­  r®  )r°  r¯  Úmessages      r%   r­  r­  ƒ  sL   € òJô .Ô/±=´?ðQð 	ô 	�‰�gœ{°zÀA±~ÕFØ=AÔ#×,Ñ,¨\Ò:ð 4Cr'   c                 ó*   — dt         j                  d<   y )NFr«  )r­  r®  r    r'   r%   Ú!_reset_warn_typed_storage_removalr¶  —  s   € Ø9>Ô×(Ñ(¨Ò6r'   c                óx   — | j                  dd«      d   }|dt        j                  j                  «       dfv r|S y)NÚ.r4  éÿÿÿÿrC   rK   rÕ   )ÚrsplitrF   r*  r+  )ÚmoduleÚ	last_parts     r%   Ú_get_device_from_moduler½  ›  s<   € Ø—‘˜c 1Ó% bÑ)€IØ�VœUŸX™X×CÑCÓEÀuÐMÑMØÐàr'   c                  ó8  ‡ — e Zd ZU dZded<   dZded<   ded<   ed	„ «       Zedfd
„«       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dgd„Zd„ Zdhd„Zd„ Zd„ Zd„ Zd„ Zdidjd„Zd„ Zd„ Z	 	 dk	 	 	 	 	 dld„Zdkdgd„Zdkdgd„Zdd œdmd!„Zd"„ Zd#„ Zdnd$„Zd%„ Z d&„ Z!d'„ Z"d(„ Z#d)„ Z$d*„ Z%ˆ fd+„Z&d,„ Z'd-„ Z(d.„ Z)dodpd/„Z*dodpd0„Z+d1„ Z,d2„ Z-dd3œd4„Z.ed5„ «       Z/ed6„ «       Z0d7„ Z1d8„ Z2d9„ Z3d:„ Z4d;„ Z5d<„ Z6d=„ Z7d>„ Z8d?„ Z9d@„ Z:e;dA„ «       Z<dB„ Z=e;dC„ «       Z>e;dddDœdE„«       Z?dF„ Z@dG„ ZAdH„ ZBdI„ ZCdJ„ ZDdK„ ZEdL„ ZFdM„ ZGdN„ ZHdO„ ZIdP„ ZJdQ„ ZKdR„ ZLdS„ ZMdT„ ZNdU„ ZOdV„ ZPe;dW„ «       ZQe;dX„ «       ZRdY„ ZSdZ„ ZTd[„ ZUd\„ ZVd]„ ZWd^„ ZXe;d_„ «       ZYd`„ ZZda„ Z[e;dd3œdb„«       Z\dc„ Z]dd„ Z^de„ Z_ˆ xZ`S )qr   Fr   r   Nr   r   útorch.dtyper@   c                ó   — | j                   S r   )r@   r+   s    r%   Ú_dtypezTypedStorage._dtypeª  s   € à�z‰zÐr'   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                ón   — t        «        | j                  t        d| j                  «       «      |«       | S )Nr   )r­  Ú_setitemÚsliceÚ_size)r"   Úvalues     r%   Úfill_zTypedStorage.fill_´  s(   € Ü#Ô%Ø�‰”e˜A˜tŸz™z›|Ó,¨eÔ4Øˆr'   )Úwrap_storager@   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kD  rt	        |dz   «      ‚t        |«      dk(  rRt        |d   «      sDt        |d   t        j                  j                  «      st        |dt        |d   «      › �z   «      ‚t        || j                   t#        | j$                  «      d	d
œŽS t        |«      dk7  rt	        |dz   «      ‚t        |t        j&                  «      st        |dt        |«      › �z   «      ‚t#        | j$                  «      }|j(                  j                  |k7  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 specifiedr4  ú
Too many positional argumentsr   ú
Argument type not recognized: T)r@   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É  r@   rÊ  )r­  rF   rã   Ú_LegacyStorageÚRuntimeErrorr   rÉ   Ú__new__r¦   r¢  rÜ   ÚcollectionsÚabcÚSequencerÝ   rA   rÁ  r½  rD  r   r   r@   )	r[   rÉ  r@   r   rÊ  r#   Úarg_error_msgÚ
cls_devicerÌ   s	           €r%   rÓ  zTypedStorage.__new__¹  s  ø€ ñ Ü'Ô)à”%—-‘-×.Ñ.Ò.ÜØJóð ð ”,ÒÜ‘7‘? 3Ó'Ð'ð �%ð 6ð 6ð ð Ð!Ü"Ø!Ð$UÑUóð ð Ð Ü"Ø!Ð$TÑTóð ð Ð#Ü�t“9˜q’=Ü&Ø%Ð(IÑIóð ô
 ˜“I ’NÜ" 4¨¡7œOÜ& t¨A¡w´·±×0HÑ0HÔIä#Ø%Ø<¼TÀ$ÀqÁ'»]¸OÐLñMóð ô
 $ØØŸ*™*Ü2°3·>±>ÓBØ"ò	ð ô �t“9 ’>Ü&Ø%ð)ñ)óð ô " ,´×0DÑ0DÔEÜ#Ø%ØVÔW[Ð\hÓWiÐVjÐkñlóð ô
 5°S·^±^ÓD�
à×&Ñ&×+Ñ+¨zÒ9Ü&Ø%Ø?À
¸|Ø$ \×%8Ñ%8×%=Ñ%=Ð$>ð@ñ@óð ô $ØØ!-ØŸ)™)Ø"ò	ð r'   )r   r@   rÉ  rÊ  c               ó¾  — |s
t        «        d}|�³t        |«      dk7  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   «      ‚|| _	        y |€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                  |¬«      | _	        y t        |«      dk(  r¬t#        |d   «      r:t	        j                  t%        |d   «      | j'                  «       z  |¬«      | _	        y t        |d   t(        j*                  j,                  «      r t/        |d   | j
                  |«      | _	        y 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Õ   rC   ú/Cannot create CUDA storage with quantized dtyperg   r4  rÍ  rÌ  )r­  r¦   rÒ  rÜ   rF   r@   rÝ   rA   r   r˜  Úget_default_dtyper   r�  rŽ  r�  rŒ  r‹  r¢  r÷   r6  rÔ  rÕ  rÖ  rœ  )r"   r   r@   rÉ  rÊ  r#   r×  s          r%   r&   zTypedStorage.__init__  sW  € ñ Ü'Ô)ðEð 	ð Ð#Ü�4‹y˜AŠ~Ü"Ø!ð%ñ%óð ð ˆ}Ü"Ø!Ð$JÑJóð ô ˜e¤U§[¡[Ô1ÜØ!ØDÄTÈ%Ã[ÀMÐRñSóð ð
 Ð!Ü"Ø!Ø`ñaóð ð
 ˆDŒJä˜l¬E×,@Ñ,@ÔAÜØ!ØRÔSWÐXdÓSeÐRfÐgñhóð ð
 %1ˆDÕ!ð 7<°mœ×0Ñ0Ô2ÈˆDŒJÜ—\‘\¨6¨>¡%¸vÓFˆFà�z‰zÜ—‘Ü—‘Ü—‘Ü—‘Ü—‘ðñ ð —;‘; &Ò(Ü&ØIóð ô �4‹y˜AŠ~Ü(-×(<Ñ(<ÀFÔ(K�Õ%ä�T“˜a’Ü˜$˜q™'”?Ü,1×,@Ñ,@Ü˜D ™G› t×'9Ñ'9Ó';Ñ;ÀFô-�DÕ)ô    Q¡¬¯©×)AÑ)AÔBÜ,FØ˜Q™ §¡¨Vó-�DÕ)ô $Ø%Ø<¼TÀ$ÀqÁ'»]¸OÐLñMóð ô # =Ð3TÑ#TÓUÐUr'   c                ó\   — t        «        | j                  j                  j                  dk(  S r`  ©r­  r˜  r   rA   r+   s    r%   r‡   zTypedStorage.is_cudap  s%   € ä#Ô%Ø×$Ñ$×+Ñ+×0Ñ0°FÑ:Ð:r'   c                ó\   — t        «        | j                  j                  j                  dk(  S rc  rÝ  r+   s    r%   r‰   zTypedStorage.is_hpuu  s%   € ä#Ô%Ø×$Ñ$×+Ñ+×0Ñ0°EÑ9Ð9r'   c                ó.   — t        «        | j                  S )z2Return the internal :class:`torch.UntypedStorage`.)r­  r˜  r+   s    r%   r1  zTypedStorage.untypedz  s   € ä#Ô%Ø×$Ñ$Ð$r'   c                ó  — t        |«      t        j                  ur!t        dt        |«      j                  › �«      ‚t        | «      t
        u r&t        t        t        || j                  d¬«      «      S  t        | «      |¬«      S )Nzexpected UntypedStorage, got TrÐ  ©rÉ  )	rA   rF   r   rQ  rC  r   r   r   r@   )r"   r"  s     r%   Ú_new_wrapped_storagez!TypedStorage._new_wrapped_storage  s|   € Ü�Ó ¬×(<Ñ(<Ñ<Ü Ø/´°_Ó0E×0NÑ0NÐ/OÐPóð ô �‹:œÑ%ÜÜÜØ!0¸¿
¹
Èdôóð ð ”4˜“:¨?Ô;Ð;r'   c                ó6   — t        «        | j                  «       S r   ©r­  rÆ  r+   s    r%   r,   zTypedStorage.__len__�  ó   € Ü#Ô%Ø�z‰z‹|Ðr'   c                ó
  — |€|r| j                  «       S yt        |«      t        ur#t        dt        | «      › dt        |«      › �«      ‚|r`|| j                  «       kD  s|| j                  «        k  rt	        d|› d| j                  «       › �«      ‚|dkD  r|S || j                  «       z  S || j                  «       k\  s|| j                  «        k  rt	        d|› d| j                  «       › �«      ‚|| j                  «       z  S )Nr   úcan't index a ú with zindex z" out of range for storage of size )rÆ  rA   r÷   rÝ   Ú
IndexErrorr>   )r"   r0   Úis_stops      r%   Ú_maybe_wrap_indexzTypedStorage._maybe_wrap_index“  sþ   € Øˆ;ÙØ—z‘z“|Ð#àô �C‹y¤Ñ#Ü .´°d³°¸FÄ4ÈÃ9À+Ð NÓOÐOÙØ˜$Ÿ*™*›,Ò&¨C°4·:±:³<°-Ò,?Ü$Ø   Ð%GÈÏ	É	ËÀ}ÐUóð ð ˜’7Ø�Jà §¡£Ñ-Ð-à˜4Ÿ:™:›<Ò'¨S°D·J±J³L°=Ò-@Ü$Ø   Ð%GÈÏ	É	ËÀ}ÐUóð ð ˜TŸZ™Z›\Ñ)Ð)r'   c                ó:   — t        «        | j                  ||«      S r   )r­  rÄ  )r"   r0   rÇ  s      r%   r3   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$                  ¬«      }|j'                  t)        | j"                  |d¬«      «       nEt        j                   g | j                  | j"                  j$                  ¬«      j'                  | «      }|||<   y )Nrç  rè  z cannot set item with value type rÛ   TrÐ  )rÜ   r÷   rÅ  rÒ  rA   rF   Ú
is_storager@   r�  rŽ  r�  rŒ  r‹  rß   r—  rý   rÞ   r˜  r   rà   r   )r"   r0   rÇ  rš  Ú	tmp_dtyper›  s         r%   rÄ  zTypedStorage._setitem±  sg  € Ü˜#¤¤U˜|Ô,Ü ´°T³
¨|¸6Ä$ÀsÃ)ÀÐMÓNÐNÜ×Ñ˜EÔ"ÜÐ!AÄ$ÀuÃ+ÀÐOÓPÐPØ�:‰:Ü�L‰LÜ�N‰NÜ�N‰NÜ�L‰LÜ�K‰Kð
ñ 
ô —‘œeŸk™kÜ—‘¤§¡Ü—‘¤§¡Ü—‘œeŸk™kÜ—‘œUŸZ™Zð Ðð )¨¯©Ñ4ˆIÜŸ™Ø˜)¨D×,AÑ,A×,HÑ,HôˆJð �O‰OÜØ!%×!6Ñ!6¸iÐSWôõô Ÿ™Ø˜$Ÿ*™*¨T×-BÑ-B×-IÑ-Iôç‰d�4‹jð ð  ˆ
�3Šr'   c                ó8   — t        «        | j                  |«      S r   )r­  Ú_getitemr/   s     r%   r1   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¬«      j'                  |«      S | j)                  |«      }dd	lm}  |«       5  t        j.                  g | j                  | j                   j                  ¬
«      j1                  | «      }||   j3                  «       cd d d «       S # 1 sw Y   y xY w)Nr˜   r]  z7slices are only supported in UntypedStorage.__getitem__rç  rè  TrÐ  r   )Úunset_fake_temporarilyrÛ   )r˜  r   rA   r*   rÜ   rÅ  rÒ  r÷   r@   rF   r�  rŽ  r�  rŒ  r‹  rß   r—  rý   r   rñ  rë  Útorch._subclasses.fake_tensorró  rÞ   rà   Úitem)r"   r0   rš  Úidx_wrappedró  r›  s         r%   rñ  zTypedStorage._getitemØ  sŒ  € Ø× Ñ ×'Ñ'×,Ñ,°Ò6Ü%Ð&LÓMÐMô �cœ5Ô!ÜØIóð ô ˜C¤Ô%Ü ´°T³
¨|¸6Ä$ÀsÃ)ÀÐMÓNÐNà�:‰:Ü�L‰LÜ�N‰NÜ�N‰NÜ�L‰LÜ�K‰Kð
ñ 
ô —‘œeŸk™kÜ—‘¤§¡Ü—‘¤§¡Ü—‘œeŸk™kÜ—‘œUŸZ™Zð Ðô  Ø!×2Ñ2Ø& t§z¡zÑ2Øô÷ ‰h�s‹mð	ð ×,Ñ,¨SÓ1ˆÝHá#Õ%ÜŸ™Ø˜$Ÿ*™*¨T×-BÑ-B×-IÑ-Iôç‰d�4‹jð ð ˜kÑ*×/Ñ/Ó1÷	 &×%Ò%ús   Ç AH"È"H+c                óÂ   — t        «        t        |t        «      r(| j                  j	                  |j                  |«       | S | j                  j	                  ||«       | S r   )r­  rÜ   r   r˜  r8   r5   s      r%   r8   zTypedStorage.copy_  sR   € Ü#Ô%Ü�fœlÔ+Ø×!Ñ!×'Ñ'¨×(?Ñ(?ÀÔNð ˆð ×!Ñ!×'Ñ'¨°Ô=Øˆr'   c                ó6   — t        «        | j                  «       S r   )r­  Ú_nbytesr+   s    r%   r<   zTypedStorage.nbytes  s   € Ü#Ô%Ø�|‰|‹~Ðr'   c                ó6   — | j                   j                  «       S r   )r˜  r<   r+   s    r%   rù  zTypedStorage._nbytes  s   € Ø×$Ñ$×+Ñ+Ó-Ð-r'   c                ó  — t        «        |€^| j                  «       }|�|j                  dz   |j                  z   S dj	                  | j                  t        | «      j                  g«      S | j                  j                  ||«      S )Nr¸  )r­  Ú_get_legacy_storage_classrD  rC  r§   rA   r˜  )r"   r@   r7   Úlegacy_classs       r%   rA   zTypedStorage.type  s|   € ô
 	$Ô%Øˆ=Ø×9Ñ9Ó;ˆLàÐ'Ø#×.Ñ.°Ñ4°|×7LÑ7LÑLÐLà—8‘8˜TŸ_™_¬d°4«j×.AÑ.AÐBÓCÐCð ×(Ñ(×-Ñ-¨e°\ÓBÐBr'   c                ó8  — t        «        | j                  t        j                  t        j                  t        j
                  t        j                  t        j                  fv rt        d«      ‚| j                  j                  ||«      }| j                  |«      S )NrÚ  )r­  r@   rF   r�  rŽ  r�  rŒ  r‹  rÒ  r˜  rC   râ  )r"   r   r7   Úcuda_storages       r%   rC   zTypedStorage.cuda%  ss   € Ü#Ô%Ø�:‰:Ü�L‰LÜ�N‰NÜ�N‰NÜ�L‰LÜ�K‰Kð
ñ 
ô ÐPÓQÐQØ×,Ñ,×1Ñ1°&¸,ÓGˆØ×(Ñ(¨Ó6Ð6r'   c                ó8  — t        «        | j                  t        j                  t        j                  t        j
                  t        j                  t        j                  fv rt        d«      ‚| j                  j                  ||«      }| j                  |«      S )Nz.Cannot create HPU storage with quantized dtype)r­  r@   rF   r�  rŽ  r�  rŒ  r‹  rÒ  r˜  rK   râ  )r"   r   r7   Úhpu_storages       r%   rK   zTypedStorage.hpu2  ss   € Ü#Ô%Ø�:‰:Ü�L‰LÜ�N‰NÜ�N‰NÜ�L‰LÜ�K‰Kð
ñ 
ô ÐOÓPÐPØ×+Ñ+×/Ñ/°¸ÓEˆØ×(Ñ(¨Ó5Ð5r'   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                  j                  «       › d�«      ‚| j                  j                  ||¬«      }| j                  |«      S )NzCannot create z storage with quantized dtyperD   )r­  rÜ   rF   r   r@   r�  rŽ  r�  rŒ  r‹  rÒ  rA   Úupperr˜  rG   râ  )r"   r   r7   Ú
to_storages       r%   rG   zTypedStorage.to?  s°   € Ü#Ô%Ü˜&¤%§,¡,Ô/Ü—\‘\ &Ó)ˆFØ�:‰:Ü�L‰LÜ�N‰NÜ�N‰NÜ�L‰LÜ�K‰Kð
ñ 
ô Ø  §¡×!2Ñ!2Ó!4Ð 5Ð5RÐSóð ð ×*Ñ*×-Ñ-°VÈ,Ð-ÓWˆ
Ø×(Ñ(¨Ó4Ð4r'   c                ó6   — t        «        | j                  «       S r   )r­  r6  r+   s    r%   rM   zTypedStorage.element_sizeP  s   € Ü#Ô%Ø×!Ñ!Ó#Ð#r'   c                óT   — t         j                  j                  | j                  «      S r   )rF   r5  r6  r@   r+   s    r%   r6  zTypedStorage._element_sizeU  s   € Ü�|‰|×)Ñ)¨$¯*©*Ó5Ð5r'   c                óJ   — t        «        | j                  j                  «       S r   )r­  r˜  rP   r+   s    r%   rP   zTypedStorage.get_deviceX  s   € Ü#Ô%Ø×$Ñ$×/Ñ/Ó1Ð1r'   c           
     óJ  ‡ — t        «        dt        j                  ‰ «      › d‰ j                  › d‰ j                  › dt        ‰ «      › d�	}‰ j                  j                  dk(  rd|z   S dd	j                  ˆ fd
„t        ‰ j                  «       «      D «       «      z   }|dz   |z   S )Nr•   z(dtype=z	, device=r–   r—   r˜   r™   rš   r›   c              3  ó:   •K  — | ]  }t        ‰|   «      –— Œ y ­wr   r�   rŸ   s     €r%   r¢   z'TypedStorage.__str__.<locals>.<genexpr>e  s   øè ø€ Ð'QÑ>P¸¬¨D°©G¯Ñ>Pùr£   r¤   )
r­  rF   r¥   r@   r   r¦   rA   r§   r¨   r>   r©   s   `  r%   Ú__str__zTypedStorage.__str__\  sš   ø€ Ü#Ô%à”—‘˜tÓ$Ð% W¨T¯Z©Z¨Lð 9Ø—k‘k�] *¬S°«Y¨K°qð:ð 	ð �;‰;×Ñ˜vÒ%Ø˜XÑ%Ð%à˜UŸZ™ZÓ'Q¼eÀDÇIÁIÃKÔ>PÓ'QÓQÑQˆHØ˜d‘? XÑ-Ð-r'   c                ó,   — t        «        t        | «      S r   )r­  rž   r+   s    r%   r¬   zTypedStorage.__repr__h  s   € Ü#Ô%Ü�4‹yÐr'   c                ón   ‡ — t        «        t        ˆ fd„t        ‰ j                  «       «      D «       «      S )Nc              3  ó(   •K  — | ]	  }‰|   –— Œ y ­wr   r    rŸ   s     €r%   r¢   z(TypedStorage.__iter__.<locals>.<genexpr>n  r¯   r°   )r­  r±   r¨   r>   r+   s   `r%   r²   zTypedStorage.__iter__l  s%   ø€ Ü#Ô%ÜÓ8¤U¨4¯9©9«;Ô%7Ó8Ó8Ð8r'   c                ór   — t        «        | j                  t        j                  | j                  «      «      S r   )r­  râ  Úcopyr˜  r+   s    r%   rµ   zTypedStorage.__copy__p  s(   € Ü#Ô%Ø×(Ñ(¬¯©°4×3HÑ3HÓ)IÓJÐJr'   c                ó8   — t        «        | j                  |«      S r   )r­  Ú	_deepcopy©r"   r¸   s     r%   rº   zTypedStorage.__deepcopy__t  s   € Ü#Ô%Ø�~‰~˜dÓ#Ð#r'   c                ó`   — | j                  t        j                  | j                  |«      «      S r   )râ  r  Údeepcopyr˜  r  s     r%   r  zTypedStorage._deepcopyy  s$   € Ø×(Ñ(¬¯©°t×7LÑ7LÈdÓ)SÓTÐTr'   c                óV   •— t        «        t        ‰| �	  «       | j                  «       z   S r   )r­  rÉ   rÊ   r<   rË   s    €r%   rÊ   zTypedStorage.__sizeof__|  s"   ø€ Ü#Ô%Ü‰wÑ!Ó# d§k¡k£mÑ3Ð3r'   c                óh   — t        «        | j                  | j                  j                  «       «      S )rÎ   )r­  râ  r˜  r´   r+   s    r%   r´   zTypedStorage.clone€  s(   € ä#Ô%Ø×(Ñ(¨×)>Ñ)>×)DÑ)DÓ)FÓGÐGr'   c                ó,   — t        «        t        | «      S rÐ   )r­  rÑ   r+   s    r%   rÒ   zTypedStorage.tolist…  s   € ä#Ô%Ü�D‹zÐr'   c                óh   — t        «        | j                  | j                  j                  «       «      S )rÔ   )r­  râ  r˜  rÕ   r+   s    r%   rÕ   zTypedStorage.cpuŠ  s(   € ä#Ô%Ø×(Ñ(¨×)>Ñ)>×)BÑ)BÓ)DÓEÐEr'   c                óL   — t        «        | j                  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Ð6r'   c                ól   — t        «        | j                  | j                  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.
        rg   )r­  râ  r˜  r!  r  s     r%   r!  zTypedStorage.pin_memoryœ  s4   € ô 	$Ô%Ø×(Ñ(Ø×!Ñ!×,Ñ,°FÐ,Ó;ó
ð 	
r'   c                ó6   — t        «        | j                  «       S )r%  )r­  Ú_share_memory_r+   s    r%   r,  zTypedStorage.share_memory_«  s   € ä#Ô%Ø×"Ñ"Ó$Ð$r'   c                ó:   — | j                   j                  «        | S r   )r˜  r,  r+   s    r%   r  zTypedStorage._share_memory_±  s   € Ø×Ñ×+Ñ+Ô-Øˆr'   rg   c               óÈ   — |€d}t        j                  |«      }t         j                  j                  || j	                  «       z  |¬«      }t        || j                  d¬«      S )r.  rÕ   rg   TrÐ  )rF   r   r   r/  r6  r   r@   )r"   r>   r   r"  s       r%   r/  zTypedStorage._new_sharedµ  sb   € àˆ>ØˆFÜ—‘˜fÓ%ˆÜ×.Ñ.×:Ñ:Ø�4×%Ñ%Ó'Ñ'°ð ;ó 
ˆô Ø(°·
±
Àdô
ð 	
r'   c                ó.   — | j                   j                  S r   )r˜  r   r+   s    r%   r   zTypedStorage._cdataÁ  s   € à×$Ñ$×+Ñ+Ð+r'   c                óB   — t        «        | j                  j                  S r   )r­  r˜  r   r+   s    r%   r   zTypedStorage.deviceÅ  s   € ä#Ô%Ø×$Ñ$×+Ñ+Ð+r'   c                ó6   — t        «        | j                  «       S r   rä  r+   s    r%   r>   zTypedStorage.sizeÊ  rå  r'   c                óX   — | j                   j                  «       | j                  «       z  S r   )r˜  r<   r6  r+   s    r%   rÆ  zTypedStorage._sizeÏ  s'   € ð ×$Ñ$×+Ñ+Ó-°×1CÑ1CÓ1EÑEÐEr'   c                ó6   — t        «        | j                  «       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�  r@   ÚKeyError)r"   Úes     r%   r$  z!TypedStorage._pickle_storage_typeÙ  sG   € ð	KÜ-Ó/°·
±
Ñ;Ð;øÜò 	KÜ˜V D§J¡J <Ð/AÐBÓCÈÐJûð	Kús   ‚ ™	A¢<¼Ac                óˆ   — t        j                  «       }t        j                  | |d¬«       t        |j                  «       ffS r¼   r¾   rÄ   s     r%   rÆ   zTypedStorage.__reduce__ß  rÇ   r'   c                ó6   — t        «        | j                  «       S r   )r­  Ú	_data_ptrr+   s    r%   rR   zTypedStorage.data_pträ  s   € Ü#Ô%Ø�~‰~ÓÐr'   c                ó6   — | j                   j                  «       S r   )r˜  rR   r+   s    r%   r+  zTypedStorage._data_ptré  s   € Ø×$Ñ$×-Ñ-Ó/Ð/r'   c                óJ   — t        «        | j                  j                  «       S r   )r­  r˜  rT   r+   s    r%   rT   zTypedStorage.resizableì  s   € Ü#Ô%Ø×$Ñ$×.Ñ.Ó0Ð0r'   c                ó:   — t        «        | j                  |«       y r   )r­  Ú_resize_rt   s     r%   ru   zTypedStorage.resize_ð  s   € Ü#Ô%Ø�‰�dÕr'   c                ó\   — | j                   j                  || j                  «       z  «       y r   )r˜  ru   r6  rt   s     r%   r/  zTypedStorage._resize_õ  s$   € Ø×Ñ×%Ñ% d¨T×-?Ñ-?Ó-AÑ&AÕBr'   c                ó,   — t        j                  |i |¤ŽS r   )r   r…   ra   s      r%   r…   zTypedStorage._free_weak_refø  s   € ä×,Ñ,¨dÐ=°fÑ=Ð=r'   c                ó:   —  | j                   j                  |i |¤ŽS r   )r˜  rw   r!   s      r%   rw   zTypedStorage._weak_refü  s    € Ø.ˆt×$Ñ$×.Ñ.°Ð?¸Ñ?Ð?r'   c                ó:   — t        «         | j                  |i |¤ŽS r   )r­  Ú_from_bufferra   s      r%   rb   zTypedStorage.from_bufferÿ  s    € ä#Ô%Øˆs×Ñ Ð0¨Ñ0Ð0r'   rÛ   c               óÎ  — | t         k(  rz|€t        j                  «       n|}t        j                  |€dn|«      }|j                  dk7  rt        d|j                  › �«      ‚t        j                  j                  |d|i|¤Ž}nU|€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 r@   é   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   rF   rÛ  r   rA   rÒ  r   rb   r¦   rÁ  )r[   r@   r   r#   r$   r"  s         r%   r4  zTypedStorage._from_buffer  s
  € à”,ÒØ16°”E×+Ñ+Ô-ÀEˆEÜ—\‘\¨6¨>¡%¸vÓFˆFØ�{‰{˜eÒ#Ü"ØIÈ&Ï+É+ÈÐWóð ô 5:×4HÑ4H×4TÑ4TØð5Ø"ð5Ø&,ñ5‰Oð
 Ð ¤C¨£I°¢NÜ"ðNóð ð Ð!Ü"ðNóð ð
 —J‘JˆEÜ#×2Ñ2×>Ñ>ØðØ"ðØ&,ñˆOô ¨ÀÐQUÔVÐVr'   c                óz  — t        |t        j                  «      st        dt	        |«      › �«      ‚t        j
                  g | j                  | j                  ¬«      j                  | «      j                  |«      j                  «       }|j                  «       | j                  «       k(  r|j                  «       }|S rÚ   )rÜ   rF   r@   rÝ   rA   rÞ   r   rà   rG   rá   rR   r´   râ   s      r%   r	   zTypedStorage._to$  s‡   € Ü˜%¤§¡Ô-ÜÐHÌÈeËÈÐVÓWÐWä�L‰L˜ 4§:¡:°d·k±kÔBß‰T�$‹Zß‰R�‹Yß‰^Óð	 	ð ×ÑÓ §¡£Ò0Ø—m‘m“oˆGØˆr'   c                óT   — t        «        | j                  t        j                  «      S rç   )r­  r	   rF   rè   r+   s    r%   rè   zTypedStorage.double1  ó   € ä#Ô%Ø�x‰xœŸ™Ó%Ð%r'   c                óT   — t        «        | j                  t        j                  «      S rë   )r­  r	   rF   rì   r+   s    r%   rì   zTypedStorage.float6  ó   € ä#Ô%Ø�x‰xœŸ™Ó$Ð$r'   c                óT   — t        «        | j                  t        j                  «      S rï   )r­  r	   rF   rð   r+   s    r%   rð   zTypedStorage.half;  ó   € ä#Ô%Ø�x‰xœŸ
™
Ó#Ð#r'   c                óT   — t        «        | j                  t        j                  «      S ró   )r­  r	   rF   rô   r+   s    r%   rô   zTypedStorage.long@  r=  r'   c                óT   — t        «        | j                  t        j                  «      S rö   )r­  r	   rF   r÷   r+   s    r%   r÷   zTypedStorage.intE  s   € ä#Ô%Ø�x‰xœŸ	™	Ó"Ð"r'   c                óT   — t        «        | j                  t        j                  «      S rù   )r­  r	   rF   rú   r+   s    r%   rú   zTypedStorage.shortJ  r;  r'   c                óT   — t        «        | j                  t        j                  «      S rü   )r­  r	   rF   rý   r+   s    r%   rþ   zTypedStorage.charO  r=  r'   c                óT   — t        «        | j                  t        j                  «      S r   )r­  r	   rF   rß   r+   s    r%   r  zTypedStorage.byteT  r;  r'   c                óT   — t        «        | j                  t        j                  «      S r  )r­  r	   rF   r  r+   s    r%   r  zTypedStorage.boolY  r=  r'   c                óT   — t        «        | j                  t        j                  «      S r  )r­  r	   rF   r  r+   s    r%   r  zTypedStorage.bfloat16^  s   € ä#Ô%Ø�x‰xœŸ™Ó'Ð'r'   c                óT   — t        «        | j                  t        j                  «      S r	  )r­  r	   rF   r
  r+   s    r%   r  zTypedStorage.complex_doublec  s   € ä#Ô%Ø�x‰xœŸ™Ó&Ð&r'   c                óT   — t        «        | j                  t        j                  «      S r  )r­  r	   rF   r  r+   s    r%   r  zTypedStorage.complex_floath  r9  r'   c                óT   — t        «        | j                  t        j                  «      S r  )r­  r	   rF   r  r+   s    r%   r  zTypedStorage.float8_e5m2m  s   € ä#Ô%Ø�x‰xœ×)Ñ)Ó*Ð*r'   c                óT   — t        «        | j                  t        j                  «      S r  )r­  r	   rF   r  r+   s    r%   r  zTypedStorage.float8_e4m3fnr  s   € ä#Ô%Ø�x‰xœ×+Ñ+Ó,Ð,r'   c                óT   — t        «        | j                  t        j                  «      S r  )r­  r	   rF   r  r+   s    r%   r  zTypedStorage.float8_e5m2fnuzw  ó   € ä#Ô%Ø�x‰xœ×-Ñ-Ó.Ð.r'   c                óT   — t        «        | j                  t        j                  «      S r  )r­  r	   rF   r  r+   s    r%   r  zTypedStorage.float8_e4m3fnuz|  rJ  r'   c                óÖ   — t        «        | t        k(  rt        d«      ‚t        j	                  |||t
        j                  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�   rF   r5  r6  r@   )r[   r‹   rŒ   r>   r"  rã   s         r%   r�   zTypedStorage.from_file�  s^   € ô( 	$Ô%Ø”,ÒÜÐPÓQÐQÜ(×2Ñ2Ø�f˜d¤U§\¡\×%?Ñ%?ÀÇ	Á	Ó%JÑJó
ˆñ  ?Ô3ˆØˆr'   c                ó,   — t        j                  |i |¤ŽS r   )r   r�   ra   s      r%   r�   zTypedStorage._expiredž  s   € ä×&Ñ&¨Ð7°Ñ7Ð7r'   c                ó:   —  | j                   j                  |i |¤ŽS r   )r˜  rr   r!   s      r%   rr   zTypedStorage._write_file¢  s    € Ø0ˆt×$Ñ$×0Ñ0°$ÐA¸&ÑAÐAr'   c                ó:   —  | j                   j                  |i |¤ŽS r   )r˜  ry   r!   s      r%   ry   zTypedStorage._set_from_file¥  ó    € Ø3ˆt×$Ñ$×3Ñ3°TÐD¸VÑ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Ñ1°4ÐB¸6ÑBÐBr'   c                ó6   — t        «        | j                  «       S r   )r­  Ú
_is_sharedr+   s    r%   r   zTypedStorage.is_shared®  s   € Ü#Ô%Ø�‰Ó Ð r'   c                ó6   — | j                   j                  «       S r   )r˜  r   r+   s    r%   rT  zTypedStorage._is_shared³  s   € Ø×$Ñ$×.Ñ.Ó0Ð0r'   c                ó@   — t        j                  j                  |i |¤ŽS r   )rF   r   r�   ra   s      r%   r�   zTypedStorage._new_shared_cuda¶  s   € ä×#Ñ#×4Ñ4°dÐE¸fÑEÐEr'   c                ón   —  | j                   j                  |i |¤Ž\  }}}|||| j                  «       z  fS r   )r˜  rV   r6  )r"   r#   r$   Úmanager_handleÚstorage_handler>   s         r%   rV   z!TypedStorage._share_filename_cpu_º  sH   € ð
 7ˆD×!Ñ!×6Ñ6¸ÐGÀÑGñ		
ØØØà˜~¨t°t×7IÑ7IÓ7KÑ/KÐKÐKr'   c                ó:   — | j                   j                  «        | S r   )r˜  rp   r+   s    r%   rp   zTypedStorage._shared_decrefÂ  s   € Ø×Ñ×,Ñ,Ô.Øˆr'   c               ó@   — t        j                  j                  |i |¤ŽS r   ©rF   r   ri   rj   s       r%   rk   z!TypedStorage._release_ipc_counterÆ  ó   € ä×#Ñ#×=Ñ=¸tÐNÀvÑNÐNr'   c                ó:   —  | j                   j                  |i |¤ŽS r   )r˜  rƒ   r!   s      r%   rƒ   zTypedStorage._shared_increfÊ  rP  r'   c                ój   —  | j                   j                  |i |¤Ž\  }}||| j                  «       z  fS r   )r˜  rX   r6  )r"   r#   r$   Úfdr>   s        r%   rX   zTypedStorage._share_fd_cpu_Í  s<   € Ø7�4×(Ñ(×7Ñ7¸ÐHÀÑH‰ˆˆDØ�4˜4×-Ñ-Ó/Ñ/Ð/Ð/r'   c                óŽ  — | j                   t        «       vry t        «       | j                      }| j                  j                  dddt        j
                  j                  «       fvry | j                  j                  dk(  rt        n#t        t        | j                  j                  «      }	 t        ||«      S # t        $ r Y y w xY w)NrÕ   rC   rK   )	r@   r�  r   rA   rF   r*  r+  ÚgetattrÚAttributeError)r"   Ústorage_namer»  s      r%   rü  z&TypedStorage._get_legacy_storage_classÑ  s­   € Ø�:‰:Ô7Ó9Ñ9Øä1Ó3°D·J±JÑ?ˆà�;‰;×ÑØØØÜ�H‰H×2Ñ2Ó4ð	$
ñ 
ð ð —[‘[×%Ñ%¨Ò.�E´G¼EÀ4Ç;Á;×CSÑCSÓ4Tð 	ð	Ü˜6 <Ó0Ð0øÜò 	Ùð	ús   Â,B8 Â8	CÃCr@  r?  )Fr   )r6   r   r7   zbool | Noner=  )r@   r>  r7   r  r<  z!_StorageBase | TypedStorage | str)r   r   r7   r  r<  r   r;  rA  rB  )arC  rD  rE  r   rF  r   rH  rÁ  r‹   rÈ  rÓ  r&   r‡   r‰   r1  râ  r,   rë  r3   rÄ  r1   rñ  r8   r<   rù  rA   rC   rK   rG   rM   r6  rP   r
  r¬   r²   rµ   rº   r  rÊ   r´   rÒ   rÕ   r  r!  r,  r  r/  r   r   r>   rÆ  r%  r$  rÆ   rR   r+  rT   ru   r/  rG  r…   rw   rb   r4  r	   rè   rì   rð   rô   r÷   rú   rþ   r  r  r  r  r  r  r  r  r  r�   r�   rr   ry   r{   r}   r   rT  r�   rV   rp   rk   rƒ   rX   rü  rI  rJ  s   @r%   r   r   £  s
  ø… Ø€IˆuÓà(,€LÐ%Ó,àÓàñó ðð ò.ó ð.ò
ð ØØØöZð~ ØØØôYVðv ñ;ó ð;ð ñ:ó ð:ò%ó
<ò ó*ò4)ò! òF"ò*2ôXòò
.ð
 !Ø"ðCàðCð ðCð 
+ó	Cô"7ô6ð BGõ 5ò"$ò
6ó2ò
.òò9òKò$ò
Uô4òHò
ò
Fô
7ô
ò%òð +/ô 

ð ñ,ó ð,ð ñ,ó ð,òò
Fò
+ò
Kò3ò
 ò
0ò1òò
Cð ñ>ó ð>ò@ð ñ1ó ð1ð Ø'+°Dó Wó ðWò>ò&ò
%ò
$ò
$ò
#ò
%ò
$ò
%ò
$ò
(ò
'ò
&ò
+ò
-ò
/ò
/ð
 ñó ðð8 ñ8ó ð8òBòEòAòCò!ò
1ð ñFó ðFòLòð Ø04ó Oó ðOòEò0ör'   c                  ó   — e Zd ZU ded<   d„ Zy)Ú_LegacyStorageMetar¿  r@   c                ó¸   — t        |«      t        u rIt        | j                  «      }||j                  j                   k(  xr | j
                  |j
                  k(  S yr=  )rA   r   r½  rD  r   r@   )r[   ÚinstancerØ  s      r%   Ú__instancecheck__z$_LegacyStorageMeta.__instancecheck__ò  sM   € Ü�‹>œ\Ñ)Ü0°·±Ó@ˆJØ (§/¡/×"6Ñ"6Ñ6ò Ø—	‘	˜XŸ^™^Ñ+ðð r'   N)rC  rD  rE  rF  ri  r    r'   r%   rf  rf  ï  s   … ØÓór'   rf  c                  ó<   — e Zd Zed„ «       Zed„ «       Zed„ «       Zy)rÑ  c                ó~   — t         j                  j                  | | «       j                  «       z  «      } | |¬«      S )r.  rá  )rF   r   r/  r6  )r[   r>   r"  s      r%   r/  z_LegacyStorage._new_sharedü  s5   € ô  ×.Ñ.×:Ñ:¸4Á#Ã%×BUÑBUÓBWÑ;WÓXˆÙ Ô0Ð0r'   c                ó@   — t        j                  j                  |i |¤ŽS r   r\  ra   s      r%   rk   z#_LegacyStorage._release_ipc_counter  r]  r'   c                óª   — |t         j                  j                  | j                  «      z  } | t         j                  j                  |||«      ¬«      S )Nrá  )rF   r5  r6  r@   r   rf   )r[   rd   re   r>   Ú
bytes_sizes        r%   Ú_new_shared_filenamez#_LegacyStorage._new_shared_filename  sG   € àœEŸL™L×6Ñ6°s·y±yÓAÑAˆ
ÙÜ×-Ñ-×FÑFØ˜˜jóô
ð 	
r'   N)rC  rD  rE  rG  r/  rk   ro  r    r'   r%   rÑ  rÑ  û  s>   „ Øñ1ó ð1ð
 ñOó ðOð ñ
ó ñ
r'   rÑ  )Ú	metaclassc                ó`   — 	 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_typerr    sE   € ðÜ)Ó+Ð,?Ñ@Ð@øÜò ÜØ#Ð$7Ð#8Ð8KÐLó
àð	ûðús   ‚ �	-˜(¨-)r3  )r»  rž   )r%  rž   )>Ú
__future__r   rÔ  r  rX  r¿   rN  r±  Útypingr   r   r   r   Útyping_extensionsr   rF   Útorch._utilsr	   r
   Útorch.typesr   r   r   Útorch._prims_commonr   Ú__all__ÚnumpyrŸ  rž  ÚModuleNotFoundErrorÚLockrM  r   rF  r   r   rZ  r*  ÚStorageBaser   rÂ   Úcacherw  r�  r•  rœ  r¢  r¤  r¥  r¨  r­  r¶  r½  r   Ú__doc__rA   rC   rK   rG   rf  rÑ  rr  r    r'   r%   Ú<module>r€     sÅ  ðö #ã Û Û Û 	Û Û ß 4Ó 4Ý "ã ß #ß ,Ñ ,ñ Ý2ð Ð+Ð
,€ðÛà€Ið $�Y—^‘^Ó%Ð Ø02Ð Ð-Ó 2áˆCÐ4Ô5€÷@"ñ @"òF$ôN@=�U—X‘X×)Ñ)¨<ô @=òF9ð ‡�ñó ðð, ‡�ñó ðð6 ‡�ñó ðò
8ò2"ð &+Ð "ò.ò5óBò(?ó÷Cñ CðL "ŸM™M€× Ñ Ô Ø(×-Ñ-×5Ñ5€× Ñ Ô Ø'×+Ñ+×3Ñ3€× Ñ Ô ØŸ+™+€‡�Ô ô	˜ô 	ô
�\Ð-?õ 
ô*øðe/ ò Ø€IØ	ƒBðús   ÁF# Æ#	F0Æ/F0