Ë
    P/æjÀÈ  ã                  óŒ  — 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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 ddgZ	 d dlZd	Z ejB                  «       Z"i Z#de$d<    edd¬«      Z% G d„ d«      Z&d„ Z' G d„ dejP                  jR                  e&«      Z*d„ Z+ ejX                  d¬«      d„ «       Z- ejX                  d¬«      d„ «       Z. ejX                  d¬«      d„ «       Z/d„ Z0d„ Z1d
a2d„ Z3d„ Z4d'd„Z5d„ Z6d(d„Z7 G d „ d«      Z8ejr                  e8jt                  _9        e&jv                  jr                  e8jv                  _9        e&jx                  jr                  e8jx                  _9        ejr                  e8jz                  _9         G d!„ d"e:«      Z> G d#„ d$e8e>¬%«      Z?d)d&„Z@y# e $ r d
ZdZY �Œiw xY w)*é    )ÚannotationsN)ÚAnyÚcastÚDictÚOptionalÚTypeÚTypeVarÚUnion)ÚSelf)Ú_toÚ_type)Ú_boolÚ_intÚStorageÚTypedStorageÚUntypedStorageTFz_Dict[int, threading.RLock]Ú_share_memory_mapÚTú!Union[_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dZd„Zd„ Z	d„ Z
d[d\d„Zd]d„ZdZd„ZdZd„Z	 d^	 	 	 	 	 d_d„Z	 d^	 d]d„Zd^d]d„ZdZd„ZdZd„ZdZd„Zd`d„Zd„ Zd„ Zedad„«       Zedad„«       Zedbd„«       Zed	d	d œ	 	 	 dbd!„«       Zedbd"„«       Zedbd#„«       Zd]d$„Zd%„ Z dcd&„Z!d]d'„Z"d(„ Z#d)„ Z$d*„ Z%d`d+„Z&edbd,„«       Z'd-„ Z(ed.„ «       Z)e*d/„ «       Z+e*d0„ «       Z,ed]d1„«       Z-ed]d2„«       Z.d3„ Z/ddd4„Z0d5„ Z1d6„ Z2d7„ Z3d8„ Z4d9„ Z5ˆ fd:„Z6d;„ Z7d<„ Z8d=„ Z9d>„ Z:d?„ Z;dd@œ	 	 	 	 	 dedA„Z<dB„ Z=dC„ Z>dD„ Z?dE„ Z@dF„ ZAdG„ ZBdH„ ZCdI„ ZDdJ„ ZEdK„ ZFdL„ ZGdM„ ZHdN„ ZIdO„ ZJdP„ ZKdQ„ ZLdfdgdR„ZMdfdgdS„ZNdT„ ZOedUdVœdW„«       ZPdX„ ZQdY„ ZRˆ xZSS )hÚ_StorageBaser   Ú_cdataFr   Ú	is_sparseÚis_sparse_csrútorch.deviceÚdeviceNú_Optional[torch.device]Ú_fake_devicec                 ó   — y ©N© ©ÚselfÚargsÚkwargss      úP/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/torch/storage.pyÚ__init__z_StorageBase.__init__-   s   € Øó    c                ó   — t         ‚r!   ©ÚNotImplementedError©r$   s    r'   Ú__len__z_StorageBase.__len__0   ó   € Ü!Ð!r)   c                ó   — t         ‚r!   r+   ©r$   Úidxs     r'   Ú__getitem__z_StorageBase.__getitem__3   r/   r)   c                ó   — t         ‚r!   r+   r#   s      r'   Ú__setitem__z_StorageBase.__setitem__6   r/   r)   c                ó   — t         ‚r!   r+   ©r$   ÚsourceÚnon_blockings      r'   Úcopy_z_StorageBase.copy_9   r/   r)   c                ó   — t         ‚r!   r+   r-   s    r'   Únewz_StorageBase.new<   r/   r)   c                ó   — t         ‚r!   r+   r-   s    r'   Únbytesz_StorageBase.nbytes?   r/   r)   c                ó"   — | j                  «       S r!   )r>   r-   s    r'   Úsizez_StorageBase.sizeB   s   € Ø�{‰{‹}Ðr)   c                ó   — t        | ||«      S r!   )r   )r$   Údtyper9   s      r'   Útypez_StorageBase.typeE   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   r9   ©Útorchr   Úto©r$   r   r9   Údevice2s       r'   rE   z_StorageBase.cudaJ   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.
        ÚhpurF   rG   rJ   s       r'   rM   z_StorageBase.hpu[   s4   € ñ 28”%—,‘,˜u fÔ-¼U¿\¹\È%Ó=PˆØ�w‰w˜g°LˆwÓAÐAr)   c                ó   — t         ‚r!   r+   r-   s    r'   Úelement_sizez_StorageBase.element_sizej   r/   r)   c                ó.   — | j                   j                  S r!   )r   Úindexr-   s    r'   Ú
get_devicez_StorageBase.get_devicem   s   € Ø�{‰{× Ñ Ð r)   c                ó   — t         ‚r!   r+   r-   s    r'   Údata_ptrz_StorageBase.data_ptrp   r/   r)   c                ó   — t         ‚r!   r+   r-   s    r'   Ú	resizablez_StorageBase.resizables   r/   r)   c                ó   — t         ‚r!   r+   r#   s      r'   Ú_share_filename_cpu_z!_StorageBase._share_filename_cpu_w   r/   r)   c                ó   — t         ‚r!   r+   r#   s      r'   Ú_share_fd_cpu_z_StorageBase._share_fd_cpu_z   r/   r)   c                ó   — t         ‚r!   r+   ©Úclsr@   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�   r_   r)   c                ó   — t         ‚r!   r+   ©r]   r%   r&   s      r'   Úfrom_bufferz_StorageBase.from_buffer…   r_   r)   )r   rB   c               ó   — t         ‚r!   r+   )r]   ÚmanagerÚobjr@   r   rB   s         r'   Ú_new_shared_filename_cpuz%_StorageBase._new_shared_filename_cpu‰   s
   € ô "Ð!r)   c                ó   — t         ‚r!   r+   rc   s      r'   Ú_release_ipc_counter_cudaz&_StorageBase._release_ipc_counter_cuda•   r_   r)   c                ó   — t         ‚r!   r+   rc   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+   rc   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+   rc   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+   rc   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°Q¤C¨¨Q©§LÑ#Mùó   ƒú
)rH   Útypenamer   ÚlenrC   Ú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 �D˜•GÑ8ùó   ƒ)Ú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 )NrH   )Ú
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ÚBytesIOrH   Ú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.©r   )rC   r>   r   r:   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   rC   rH   r   r@   r:   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.ÚmpsrÍ   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 ©rB   r   )Ú
isinstancerH   rB   Ú	TypeErrorrC   ÚtensorÚuint8r   Úset_r   r   rI   Ú_typed_storagerT   r²   ©r$   rB   Ú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)   ©r9   c               ó   — t        | ||«      S r!   )r   )r$   r   r9   s      r'   rI   z_StorageBase.to  s   € ô �4˜ Ó.Ð.r)   c                ó@   — | j                  t        j                  «      S ©z"Casts this storage to double type.)r   rH   Údoubler-   s    r'   rç   z_StorageBase.double  ó   € à�x‰xœŸ™Ó%Ð%r)   c                ó@   — | j                  t        j                  «      S ©z!Casts this storage to float type.)r   rH   Úfloatr-   s    r'   rë   z_StorageBase.float  ó   € à�x‰xœŸ™Ó$Ð$r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to half type.)r   rH   Úhalfr-   s    r'   rï   z_StorageBase.half!  ó   € à�x‰xœŸ
™
Ó#Ð#r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to long type.)r   rH   Úlongr-   s    r'   ró   z_StorageBase.long%  rð   r)   c                ó@   — | j                  t        j                  «      S ©zCasts this storage to int type.)r   rH   Úintr-   s    r'   rö   z_StorageBase.int)  s   € à�x‰xœŸ	™	Ó"Ð"r)   c                ó@   — | j                  t        j                  «      S ©z!Casts this storage to short type.)r   rH   Úshortr-   s    r'   rù   z_StorageBase.short-  rì   r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to char type.)r   rH   Úint8r-   s    r'   Úcharz_StorageBase.char1  rð   r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to byte type.)r   rH   rÞ   r-   s    r'   Úbytez_StorageBase.byte5  rì   r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to bool type.)r   rH   Úboolr-   s    r'   r  z_StorageBase.bool9  rð   r)   c                ó@   — | j                  t        j                  «      S ©z$Casts this storage to bfloat16 type.)r   rH   Úbfloat16r-   s    r'   r  z_StorageBase.bfloat16=  s   € à�x‰xœŸ™Ó'Ð'r)   c                ó@   — | j                  t        j                  «      S ©z*Casts this storage to complex double type.)r   rH   Úcdoubler-   s    r'   Úcomplex_doublez_StorageBase.complex_doubleA  s   € à�x‰xœŸ™Ó&Ð&r)   c                ó@   — | j                  t        j                  «      S ©z)Casts this storage to complex float type.)r   rH   Úcfloatr-   s    r'   Úcomplex_floatz_StorageBase.complex_floatE  rè   r)   c                ó@   — | j                  t        j                  «      S ©z&Casts this storage to float8_e5m2 type)r   rH   Úfloat8_e5m2r-   s    r'   r  z_StorageBase.float8_e5m2I  s   € à�x‰xœ×)Ñ)Ó*Ð*r)   c                ó@   — | j                  t        j                  «      S ©z(Casts this storage to float8_e4m3fn type)r   rH   Úfloat8_e4m3fnr-   s    r'   r  z_StorageBase.float8_e4m3fnM  s   € à�x‰xœ×+Ñ+Ó,Ð,r)   c                ó@   — | j                  t        j                  «      S ©z*Casts this storage to float8_e5m2fnuz type)r   rH   Úfloat8_e5m2fnuzr-   s    r'   r  z_StorageBase.float8_e5m2fnuzQ  ó   € à�x‰xœ×-Ñ-Ó.Ð.r)   c                ó@   — | j                  t        j                  «      S ©z*Casts this storage to float8_e4m3fnuz type)r   rH   Úfloat8_e4m3fnuzr-   s    r'   r  z_StorageBase.float8_e4m3fnuzU  r  r)   c                óº   — t        j                  g t         j                  | j                  ¬«      j	                  t        t        | «      «      j                  |«      S )zäDetermine whether the CPU storage is already pinned on device.

        Args:
            device (str or torch.device): The device to pin memory on. Default: ``'cuda'``.

        Returns:
            A boolean variable.
        rÚ   )rH   rÝ   rÞ   r   rß   r   r   Ú	is_pinned©r$   r   s     r'   r  z_StorageBase.is_pinnedY  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 )zê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'``.

        Returns:
            A pinned CPU storage.
        rÔ   zcannot pin 'z' only CPU memory can be pinnedrÚ   )r   rC   rÜ   rH   rÝ   rÞ   rß   r   r   Ú
pin_memoryÚuntyped_storage)r$   r   Úpinned_tensors      r'   r   z_StorageBase.pin_memoryh  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_strategyrE   Úfile_system)	Útorch.multiprocessingr&  r   rC   rH   Ú_CÚ_get_privateuse1_backend_namerX   rZ   )r$   r&  s     r'   Úshare_memory_z_StorageBase.share_memory_{  sf   € å>à�;‰;×Ñ ¬¯©×(NÑ(NÓ(PÐQÑQØð
 ˆñ	 "Ó# }Ò4Ø×%Ñ%Ô'ð ˆð ×ÑÔ!Øˆr)   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%  rE   rM   rÍ   r'  )	r(  r&  rH   r   rC   r)  r*  r^   ra   )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)rH   Ú_utilsÚ_element_sizeÚ
is_complexÚmaxrö   r�   )r$   rB   Ú	elem_sizes      r'   Úbyteswapz_StorageBase.byteswap—  s@   € ä—L‘L×.Ñ.¨uÓ5ˆ	à×ÒÜœC 	¨A¡Ó.°Ó2ˆIØ�‰�yÕ!r)   ©Úreturnr   r!   )r8   r   r9   z_Optional[_bool]r;  r   )r;  r   ©NF)rB   ú_Optional[str]r9   r   r;  r   )r;  r   )r]   úType[T]r@   r   r;  r   )r]   r>  r;  r   )r@   r   ©r;  r=  )r   r   r9   r   r;  r   ©rE   ©r   zUnion[str, torch.device])TÚ__name__Ú
__module__Ú__qualname__Ú__annotations__r   r   r   r(   r.   r3   r5   r:   r<   r>   r@   rC   rE   rM   rO   rR   rT   rV   rX   rZ   Úclassmethodr^   ra   rd   rh   rj   rl   rn   rp   rs   ru   rw   ry   r{   r}   r   r�   rƒ   Úpropertyr…   r‡   r‹   r�   r�   r‘   rª   r°   r³   r¸   rÄ   rÈ   r²   rÑ   rÔ   r×   r   rI   rç   rë   rï   ró   rö   rù   rý   r   r  r  r
  r  r  r  r  r  r  r   r+  r.  r0  r9  Ú__classcell__©rÊ   s   @r'   r   r   %   sÍ  ø… ØƒKØ€IˆuÓØ €M�5Ó ØÓà,0€LÐ)Ó0òó"ò"ò"ô"ó"ó"óð CHð0Ø#ð0Ø:?ð0à	*ó0ð ).ðBà	*óBô"Bó"ó!ó"ó"ò"ò"ð ò"ó ð"ð ò"ó ð"ð ò"ó ð"ð ð Øñ	"Øð	"ð 
ò	"ó ð	"ð ò"ó ð"ð ò"ó ð"ó"ò"ó"ó"ò"ò"ò"ó"ð ò"ó ð"ò"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ò"ó ð"ð ò"ó ð"ò"ó"ò*ò9òòò3ô
2òIòòòòð >Cñ/Ø%ð/Ø5:ð/à	*ó/ò
&ò%ò$ò$ò#ò%ò$ò%ò$ò(ò'ò&ò+ò-ò/ò/ô
ô/ò&
ð Ø).ó 
/ó ð
/òö"r)   r   c                óB   ‡ — t        j                  ‰ «      ˆ fd„«       }|S )Nc                ór  •— d }d }t         5  | j                  }|t        v r
t        |   }n4t        j                  «       t        |<   t        |   j                  «        |}d d d «       |�|5  	 d d d «       	  ‰| g|¢­i |¤Ž|�?| j                  |k(  sJ ‚t         5  t        |   j                  «        t        |= d d d «       S S # 1 sw Y   ŒexY w# 1 sw Y   ŒcxY w# 1 sw Y   S xY w# |�K| j                  |k(  sJ ‚t         5  t        |   j                  «        t        |= d d d «       w # 1 sw Y   w x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¡  sM  ø€ àˆØˆÜñ 	Ø—+‘+ˆCØÔ'Ñ'Ü+¨CÑ0‘ä)2¯©Ó):Ô! #Ñ&Ü! #Ñ&×.Ñ.Ô0Ø�÷	ð ÐØñ Ø÷ð	3Ù�dÐ,˜TÒ, VÑ,ð Ð"ð —{‘{ gÒ-Ð-Ð-Ü'ñ 3Ü% gÑ.×6Ñ6Ô8Ü)¨'Ð2÷3ð 3ð	 #÷)	ð 	ú÷ð ú÷3ð 3ûð	 Ð"ð —{‘{ gÒ-Ð-Ð-Ü'ñ 3Ü% gÑ.×6Ñ6Ô8Ü)¨'Ð2÷3÷ 3ñ 3úð	 #úsH   ŒACÁ+CÁ6C' ÂCÃCÃCÃC$	Ã'D6ÄD)Ä 	D6Ä)D2Ä.D6)Ú	functoolsÚwraps)rT  rU  s   ` r'   Ú_share_memory_lock_protectedrX     s%   ø€ Ü‡_�_�RÓó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                ój   •— | j                   j                  dk(  rt        d«      ‚t        ‰| �  |i |¤ŽS )Nr–   ú$Not available for 'meta' device type)r   rC   r,   rÇ   r3   ©r$   r%   r&   rÊ   s      €r'   r3   zUntypedStorage.__getitem__Å  s6   ø€ Ø�;‰;×Ñ˜vÒ%Ü%Ð&LÓMÐMÜ‰wÑ" DÐ3¨FÑ3Ð3r)   c                ó4   — | j                   j                  dk(  S ©NrE   ©r   rC   r-   s    r'   r…   zUntypedStorage.is_cudaÊ  s   € à�{‰{×Ñ 6Ñ)Ð)r)   c                ó4   — | j                   j                  dk(  S ©NrM   r_  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Ç   rZ   r\  s      €r'   rZ   zUntypedStorage._share_fd_cpu_þ  s   ø€ ä‰wÑ% tÐ6¨vÑ6Ð6r)   c                ó"   •— t        ‰| �  |i |¤ŽS r!   )rÇ   rX   r\  s      €r'   rX   z#UntypedStorage._share_filename_cpu_  s   ø€ ä‰wÑ+¨TÐ<°VÑ<Ð<r)   r?  )rB  rC  rD  r3   rG  r…   r‡   r‰   rX  r+  rZ   rX   rH  rI  s   @r'   r   r   Ä  s�   ø„ ô4ð
 ñ*ó ð*ð ñ)ó ð)ð ò$ó ð$ð "ó 6ó "ð 6ðD "ó7ó "ð7ð "ó=ó "ô=r)   c                óV   — t        j                  t        j                  | «      d¬«      S )NF)Úweights_only)rH   Úloadr½   r¾   )rÃ   s    r'   rÀ   rÀ     s   € Ü�:‰:”b—j‘j “m°%Ô8Ð8r)   )Úmaxsizec            
     ó2  — t         j                  t         j                  t         j                  t         j                  t         j
                  t         j                  t         j                  t         j                  t         j                  t         j                  h
S r!   )rH   r  r  r  r  Úbits8Úbits16Úbits1x8Úbits2x4Úbits4x2Ú	complex32r"   r)   r'   Ú_new_dtypesrq    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)rH   rç   rë   rï   ró   rö   Úint16rü   rÞ   r  r  r	  r  Úqint8Úqint32Úquint8Úquint4x2Úquint2x4r"   r)   r'   Ú_dtype_to_storage_type_maprŠ    s  € ðÜ�‰�oðä�‰�^ðô 	�
‰
�Mðô 	�
‰
�Mð	ô
 	�	‰	�<ðô 	�‰�^ðô 	�
‰
�Mðô 	�‰�]ðô 	�
‰
�Mðô 	�‰Ð)ðô 	�‰Ð-ðô 	�‰Ð+ðô 	�‰�^ðô 	�‰�oðô 	�‰�oðô  	�‰Ð)ð!ô" 	�‰Ð)ð#ð r)   c                 óh   — t        «       j                  «       D � �ci c]  \  } }|| “Œ
 }} }|S c c}} w r!   )rŠ  Úitems)rS  ÚvalÚ	dtype_maps      r'   Ú_storage_type_to_dtype_mapr�  9  s5   € ä*DÓ*F×*LÑ*LÓ*N×O™h˜c 3��c‘ÐO€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Ú   )rH   r‡  rˆ  r‰  r†  r…  rÞ   Úint32rü   rÝ   rà   Ú_untyped_storage)ÚsequencerB   r   Úinterpret_dtypesÚ
tmp_tensors        r'   Ú_get_storage_from_sequencer–  ?  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œ  X  s(   € ÝÜ˜!œc¤2§:¡:Ð.Ó/Ð/ä˜!œSÓ!Ð!r)   c                 ó   — t         S r!   )Ú"_always_warn_typed_storage_removalr"   r)   r'   Ú&_get_always_warn_typed_storage_removalrŸ  b  s   € Ü-Ð-r)   c                ó,   — t        | t        «      sJ ‚| ay r!   )rÛ   r  rž  )Úalways_warns    r'   Ú&_set_always_warn_typed_storage_removalr¢  f  s   € ä�k¤4Ô(Ð(Ð(Ø)4Ñ&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_timeo  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()r3  )Ú
stacklevelTr¥  )rŸ  ÚwarningsÚwarnÚUserWarningr§  r¨  )rª  r©  Úmessages      r'   r§  r§  l  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ú.r3  éÿÿÿÿrE   rM   rÔ   )ÚrsplitrH   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.dtyperB   c                ó   — | j                   S r!   )rB   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_storagerB   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 specifiedr3  ú
Too many positional argumentsr   ú
Argument type not recognized: T)rB   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Ã  rB   rÄ  )r§  rH   râ   Ú_LegacyStorageÚRuntimeErrorr   rÇ   Ú__new__r¤   rœ  rÛ   ÚcollectionsÚabcÚSequencerÜ   rC   r»  r·  rC  r   r   rB   )	r]   rÃ  rB   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   rB   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Ô   rE   ú/Cannot create CUDA storage with quantized dtyperÍ   r3  rÇ  rÆ  )r§  r¤   rÌ  rÛ   rH   rB   rÜ   rC   r   r’  Úget_default_dtyper   r‡  rˆ  r‰  r†  r…  rœ  rö   r5  rÎ  rÏ  rÐ  r–  )r$   r   rB   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   rC   r-   s    r'   r…   zTypedStorage.is_cudaY  s%   € ä#Ô%Ø×$Ñ$×+Ñ+×0Ñ0°FÑ:Ð:r)   c                ó\   — t        «        | j                  j                  j                  dk(  S ra  r×  r-   s    r'   r‡   zTypedStorage.is_hpu^  s%   € ä#Ô%Ø×$Ñ$×+Ñ+×0Ñ0°EÑ9Ð9r)   c                ó.   — t        «        | j                  S )z2Return the internal :class:`torch.UntypedStorage`.)r§  r’  r-   s    r'   r0  zTypedStorage.untypedc  s   € ä#Ô%Ø×$Ñ$Ð$r)   c                óÒ   — t        |«      t        j                  k(  sJ ‚t        | «      t        k(  r&t	        t
        t        || j                  d¬«      «      S  t        | «      |¬«      S )NTrÊ  ©rÃ  )rC   rH   r   r   r   r   rB   )r$   r!  s     r'   Ú_new_wrapped_storagez!TypedStorage._new_wrapped_storageh  s]   € Ü�OÓ$¬×(<Ñ(<Ò<Ð<Ð<ä�‹:œÒ%ÜÜÜØ!0¸¿
¹
Èdôóð ð ”4˜“:¨?Ô;Ð;r)   c                ó6   — t        «        | j                  «       S r!   ©r§  rÀ  r-   s    r'   r.   zTypedStorage.__len__u  ó   € Ü#Ô%Ø�z‰z‹|Ðr)   c                ó  — |€|r| j                  «       S yt        |«      t        k7  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À  rC   rö   rÜ   Ú
IndexErrorr@   )r$   r2   Úis_stops      r'   Ú_maybe_wrap_indexzTypedStorage._maybe_wrap_indexy  sþ   € Øˆ;ÙØ—z‘z“|Ð#àô �C‹yœCÒÜ .´°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$   r2   rÁ  s      r'   r5   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Ì  rC   rH   Ú
is_storagerB   r‡  rˆ  r‰  r†  r…  rÞ   r‘  rü   rÝ   r’  r   rß   r   )r$   r2   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§  Ú_getitemr1   s     r'   r3   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   rC   r,   rÛ   r¿  rÌ  rö   rB   rH   r‡  rˆ  r‰  r†  r…  rÞ   r‘  rü   r   rë  rå  Útorch._subclasses.fake_tensorrí  rÝ   rß   Úitem)r$   r2   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á#Ó%ñ 	2ÜŸ™Ø˜$Ÿ*™*¨T×-BÑ-B×-IÑ-Iôç‰d�4‹jð ð ˜kÑ*×/Ñ/Ó1÷		2÷ 	2ò 	2ús   Ç AH"È"H+c                óÂ   — t        «        t        |t        «      r(| j                  j	                  |j                  |«       | S | j                  j	                  ||«       | S r!   )r§  rÛ   r   r’  r:   r7   s      r'   r:   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_classrC  rB  r¥   rC   r’  )r$   rB   r9   Úlegacy_classs       r'   rC   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§  rB   rH   r‡  rˆ  r‰  r†  r…  rÌ  r’  rE   rÜ  )r$   r   r9   Úcuda_storages       r'   rE   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§  rB   rH   r‡  rˆ  r‰  r†  r…  rÌ  r’  rM   rÜ  )r$   r   r9   Úhpu_storages       r'   rM   zTypedStorage.hpu  ss   € Ü#Ô%Ø�:‰:Ü�L‰LÜ�N‰NÜ�N‰NÜ�L‰LÜ�K‰Kð
ñ 
ô ÐOÓPÐPØ×+Ñ+×/Ñ/°¸ÓEˆØ×(Ñ(¨Ó5Ð5r)   rã   c               ór  — t        «        | 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 dtyperF   )r§  rB   rH   r‡  rˆ  r‰  r†  r…  rÌ  rC   Úupperr’  rI   rÜ  )r$   r   r9   Ú
to_storages       r'   rI   zTypedStorage.to%  s”   € Ü#Ô%Ø�:‰:Ü�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§  r5  r-   s    r'   rO   zTypedStorage.element_size4  s   € Ü#Ô%Ø×!Ñ!Ó#Ð#r)   c                óT   — t         j                  j                  | j                  «      S r!   )rH   r4  r5  rB   r-   s    r'   r5  zTypedStorage._element_size9  s   € Ü�|‰|×)Ñ)¨$¯*©*Ó5Ð5r)   c                óJ   — t        «        | j                  j                  «       S r!   )r§  r’  rR   r-   s    r'   rR   zTypedStorage.get_device<  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>I  s   øè ø€ Ò'Q¸¬¨D°©G¯Ñ'Qùr¡   r¢   )
r§  rH   r£   rB   r   r¤   rC   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__L  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>R  r­   r®   )r§  r¯   r¦   r@   r-   s   `r'   r°   zTypedStorage.__iter__P  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__T  s(   € Ü#Ô%Ø×(Ñ(¬¯©°4×3HÑ3HÓ)IÓJÐJr)   c                ó8   — t        «        | j                  |«      S r!   )r§  Ú	_deepcopy©r$   r¶   s     r'   r¸   zTypedStorage.__deepcopy__X  s   € Ü#Ô%Ø�~‰~˜dÓ#Ð#r)   c                ó`   — | j                  t        j                  | j                  |«      «      S r!   )rÜ  r	  Údeepcopyr’  r  s     r'   r  zTypedStorage._deepcopy]  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.cloned  s(   € ä#Ô%Ø×(Ñ(¨×)>Ñ)>×)DÑ)DÓ)FÓGÐGr)   c                ó,   — t        «        t        | «      S rÏ   )r§  rÐ   r-   s    r'   rÑ   zTypedStorage.tolisti  s   € ä#Ô%Ü�D‹zÐr)   c                óh   — t        «        | j                  | j                  j                  «       «      S )rÓ   )r§  rÜ  r’  rÔ   r-   s    r'   rÔ   zTypedStorage.cpun  s(   € ä#Ô%Ø×(Ñ(¨×)>Ñ)>×)BÑ)BÓ)DÓEÐEr)   c                óL   — t        «        | j                  j                  |«      S )zèDetermine whether the CPU TypedStorage is already pinned on device.

        Args:
            device (str or torch.device): The device to pin memory on. Default: ``'cuda'``

        Returns:
            A boolean variable.
        )r§  r’  r  r  s     r'   r  zTypedStorage.is_pinneds  s!   € ô 	$Ô%Ø×$Ñ$×.Ñ.¨vÓ6Ð6r)   c                ól   — t        «        | j                  | j                  j                  |¬«      «      S )zï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'``.

        Returns:
            A pinned CPU storage.
        rÍ   )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)   rÍ   c               óÈ   — |€d}t        j                  |«      }t         j                  j                  || j	                  «       z  |¬«      }t        || j                  d¬«      S )r-  rÔ   rÍ   TrÊ  )rH   r   r   r.  r5  r   rB   )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>   r5  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Š  rB   Ú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'   rT   zTypedStorage.data_ptrÆ  s   € Ü#Ô%Ø�~‰~ÓÐr)   c                ó6   — | j                   j                  «       S r!   )r’  rT   r-   s    r'   r%  zTypedStorage._data_ptrË  s   € Ø×$Ñ$×-Ñ-Ó/Ð/r)   c                óJ   — t        «        | j                  j                  «       S r!   )r§  r’  rV   r-   s    r'   rV   zTypedStorage.resizableÎ  s   € Ü#Ô%Ø×$Ñ$×.Ñ.Ó0Ð0r)   c                ó:   — t        «        | j                  |«       y r!   )r§  Ú_resize_rr   s     r'   rs   zTypedStorage.resize_Ò  s   € Ü#Ô%Ø�‰�dÕr)   c                ó\   — | j                   j                  || j                  «       z  «       y r!   )r’  rs   r5  rr   s     r'   r)  zTypedStorage._resize_×  s$   € Ø×Ñ×%Ñ% d¨T×-?Ñ-?Ó-AÑ&AÕBr)   c                ó,   — t        j                  |i |¤ŽS r!   )r   rƒ   rc   s      r'   rƒ   zTypedStorage._free_weak_refÚ  s   € ä×,Ñ,¨dÐ=°fÑ=Ð=r)   c                ó:   —  | j                   j                  |i |¤ŽS r!   )r’  ru   r#   s      r'   ru   zTypedStorage._weak_refÞ  s    € Ø.ˆt×$Ñ$×.Ñ.°Ð?¸Ñ?Ð?r)   c                ó:   — t        «         | j                  |i |¤ŽS r!   )r§  Ú_from_bufferrc   s      r'   rd   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 rB   é   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   rH   rÕ  r   rC   rÌ  r   rd   r¤   r»  )r]   rB   r   r%   r&   r!  s         r'   r.  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Û   rH   rB   rÜ   rC   rÝ   r   rß   rI   rà   rT   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   rH   rç   r-   s    r'   rç   zTypedStorage.double  ó   € ä#Ô%Ø�x‰xœŸ™Ó%Ð%r)   c                óT   — t        «        | j                  t        j                  «      S rê   )r§  r   rH   rë   r-   s    r'   rë   zTypedStorage.float  ó   € ä#Ô%Ø�x‰xœŸ™Ó$Ð$r)   c                óT   — t        «        | j                  t        j                  «      S rî   )r§  r   rH   rï   r-   s    r'   rï   zTypedStorage.half  ó   € ä#Ô%Ø�x‰xœŸ
™
Ó#Ð#r)   c                óT   — t        «        | j                  t        j                  «      S rò   )r§  r   rH   ró   r-   s    r'   ró   zTypedStorage.long"  r7  r)   c                óT   — t        «        | j                  t        j                  «      S rõ   )r§  r   rH   rö   r-   s    r'   rö   zTypedStorage.int'  s   € ä#Ô%Ø�x‰xœŸ	™	Ó"Ð"r)   c                óT   — t        «        | j                  t        j                  «      S rø   )r§  r   rH   rù   r-   s    r'   rù   zTypedStorage.short,  r5  r)   c                óT   — t        «        | j                  t        j                  «      S rû   )r§  r   rH   rü   r-   s    r'   rý   zTypedStorage.char1  r7  r)   c                óT   — t        «        | j                  t        j                  «      S rÿ   )r§  r   rH   rÞ   r-   s    r'   r   zTypedStorage.byte6  r5  r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r  r-   s    r'   r  zTypedStorage.bool;  r7  r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r  r-   s    r'   r  zTypedStorage.bfloat16@  s   € ä#Ô%Ø�x‰xœŸ™Ó'Ð'r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r	  r-   s    r'   r
  zTypedStorage.complex_doubleE  s   € ä#Ô%Ø�x‰xœŸ™Ó&Ð&r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r  r-   s    r'   r  zTypedStorage.complex_floatJ  r3  r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e5m2O  s   € ä#Ô%Ø�x‰xœ×)Ñ)Ó*Ð*r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e4m3fnT  s   € ä#Ô%Ø�x‰xœ×+Ñ+Ó,Ð,r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e5m2fnuzY  ó   € ä#Ô%Ø�x‰xœ×-Ñ-Ó.Ð.r)   c                óT   — t        «        | j                  t        j                  «      S r  )r§  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e4m3fnuz^  rD  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‹   rH   r4  r5  rB   )r]   r‰   rŠ   r@   r!  râ   s         r'   r‹   zTypedStorage.from_filec  s^   € ô( 	$Ô%Ø”,ÒÜÐPÓQÐQÜ(×2Ñ2Ø�f˜d¤U§\¡\×%?Ñ%?ÀÇ	Á	Ó%JÑJó
ˆñ  ?Ô3ˆØˆr)   c                ó,   — t        j                  |i |¤ŽS r!   )r   r�   rc   s      r'   r�   zTypedStorage._expired€  s   € ä×&Ñ&¨Ð7°Ñ7Ð7r)   c                ó:   —  | j                   j                  |i |¤ŽS r!   )r’  rp   r#   s      r'   rp   zTypedStorage._write_file„  s    € Ø0ˆt×$Ñ$×0Ñ0°$ÐA¸&ÑAÐAr)   c                ó:   —  | j                   j                  |i |¤ŽS r!   )r’  rw   r#   s      r'   rw   zTypedStorage._set_from_file‡  ó    € Ø3ˆt×$Ñ$×3Ñ3°TÐD¸VÑDÐDr)   c                ó:   —  | j                   j                  |i |¤ŽS r!   )r’  ry   r#   s      r'   ry   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'   rN  zTypedStorage._is_shared•  s   € Ø×$Ñ$×.Ñ.Ó0Ð0r)   c                ó@   — t        j                  j                  |i |¤ŽS r!   )rH   r   r   rc   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’  rX   r5  )r$   r%   r&   Úmanager_handleÚstorage_handler@   s         r'   rX   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’  rn   r-   s    r'   rn   zTypedStorage._shared_decref¤  s   € Ø×Ñ×,Ñ,Ô.Øˆr)   c               ó@   — t        j                  j                  |i |¤ŽS r!   ©rH   r   rj   )r]   r   r%   r&   s       r'   Ú_release_ipc_counterz!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¬  rJ  r)   c                ój   —  | j                   j                  |i |¤Ž\  }}||| j                  «       z  fS r!   )r’  rZ   r5  )r$   r%   r&   Úfdr@   s        r'   rZ   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Ô   rE   rM   )	rB   rŠ  r   rC   rH   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;  r   )Fr!   )r8   r   r9   z_Optional[bool]r<  )rB   r=  r9   r  r;  z&Union[_StorageBase, TypedStorage, str])r   r   r9   r  r;  r   r:  r@  rA  )arB  rC  rD  r   rE  r   rG  r»  r‰   rÂ  rÍ  r(   r…   r‡   r0  rÜ  r.   rå  r5   r¾  r3   rë  r:   r>   ró  rC   rE   rM   rI   rO   r5  rR   r  rª   r°   r³   r¸   r  rÈ   r²   rÑ   rÔ   r  r   r+  r  r.  r   r   r@   rÀ  r  r  rÄ   rT   r%  rV   rs   r)  rF  rƒ   ru   rd   r.  r   rç   rë   rï   ró   rö   rù   rý   r   r  r  r
  r  r  r  r  r  r‹   r�   rp   rw   ry   r{   r}   rN  r   rX   rn   rW  r�   rZ   rö  rH  rI  s   @r'   r   r   Œ  s
  ø… Ø€IˆuÓà,0€LÐ)Ó0àÓàñó ðð ò.ó ð.ò
ð ØØØöZð~ ØØØôYVðv ñ;ó ð;ð ñ:ó ð:ò%ó
<òó*ò4)ò! òF"ò*2ôXòò
.ð
 !%Ø"ðCàðCð ðCð 
0ó	Cô"7ô6ð @Eõ 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¹  rB   c                óº   — t        |«      t        k(  rIt        | j                  «      }||j                  j                   k(  xr | j
                  |j
                  k(  S yr<  )rC   r   r·  rC  r   rB   )r]   ÚinstancerÒ  s      r'   Ú__instancecheck__z$_LegacyStorageMeta.__instancecheck__Ô  sM   € Ü�‹>œ\Ò)Ü0°·±Ó@ˆJØ (§/¡/×"6Ñ"6Ñ6ò Ø—	‘	˜XŸ^™^Ñ+ðð r)   N)rB  rC  rD  rE  rd  r"   r)   r'   ra  ra  Ñ  s   … ØÓór)   ra  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Û  )rH   r   r.  r5  )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!   rV  rc   s      r'   rW  z#_LegacyStorage._release_ipc_counterä  rX  r)   c                óª   — |t         j                  j                  | j                  «      z  } | t         j                  j                  |||«      ¬«      S )NrÛ  )rH   r4  r5  rB   r   rh   )r]   rf   rg   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)rB  rC  rD  rF  r.  rW  rj  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_typerm  ò  sE   € ðÜ)Ó+Ð,?Ñ@Ð@øÜò ÜØ#Ð$7Ð#8Ð8KÐLó
àð	ûðús   ‚ �	-˜(¨-)r2  )rµ  rœ   )r  rœ   )AÚ
__future__r   rÎ  r	  rV  r½   rM  r«  Útypingr   r   r   Ú_Dictr   Ú	_Optionalr   r	   r
   Útyping_extensionsr   rH   Útorch._utilsr   r   Útorch.typesr   r   r   Ú__all__Únumpyr™  r˜  ÚModuleNotFoundErrorÚLockrL  r   rE  r   r   rX  r)  ÚStorageBaser   rÀ   Ú	lru_cacherq  rŠ  r�  r–  rœ  rž  rŸ  r¢  r§  r°  r·  r   Ú__doc__rC   rE   rM   rI   ra  rË  rm  r"   r)   r'   ú<module>r|     sÛ  ðö #ã Û Û Û 	Û Û ß X× XÑ XÝ "ã ß #ß ,Ñ ,ð Ð+Ð
,€ðÛà€Ið $�Y—^‘^Ó%Ð Ø13Ð Ð.Ó 3áˆCÐ:Ô;€÷x"ñ x"òv!ôH@=�U—X‘X×)Ñ)¨<ô @=òF9ð €×Ñ˜TÔ"ñó #ðð" €×Ñ˜TÔ"ñó #ðð6 €×Ñ˜TÔ"ñó #ðò
8ò2"ð &+Ð "ò.ò5óBò(?ó÷|ñ |ð~ "ŸM™M€× Ñ Ô Ø(×-Ñ-×5Ñ5€× Ñ Ô Ø'×+Ñ+×3Ñ3€× Ñ Ô ØŸ+™+€‡�Ô ô	˜ô 	ô
�\Ð-?õ 
ô*øðq. ò Ø€IØ	ƒBðús   ÁF6 Æ6	GÇG