Ë
    g^(h¶Ë  ã                  ón  — U d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlm	Z	m
Z
mZmZmZmZ d dlmZ d dlZd dlmZmZ d dlmZmZmZ erd dlmZ dd	gZ	 d dlZd
Z 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„ «       Z-ejX                  d„ «       Z.ejX                  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 �ŒTw xY w)*é    )ÚannotationsN)ÚAnyÚcastÚOptionalÚTYPE_CHECKINGÚTypeVarÚUnion)ÚSelf)Ú_toÚ_type)Ú_boolÚ_intÚStorage)ÚDeviceLikeTypeÚTypedStorageÚUntypedStorageTFzdict[int, threading.RLock]Ú_share_memory_mapÚTú!Union[_StorageBase, TypedStorage])Úboundc                  ó  ‡ — 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	 d`	 	 	 	 	 dad„Z	 d`	 d_d„Zd`d_d„Zd\d„Zd\d„Zd\d„Zdbd„Zd„ Zd„ Zedcd„«       Zedcd „«       Zeddd!„«       Zed	d	d"œ	 ddd#„«       Zeddd$„«       Zeddd%„«       Zd_d&„Z d'„ Z!ded(„Z"d_d)„Z#d*„ Z$d+„ Z%d,„ Z&dbd-„Z'eddd.„«       Z(d/„ Z)ed0„ «       Z*e+d1„ «       Z,e+d2„ «       Z-ed_d3„«       Z.ed_d4„«       Z/d5„ Z0dfd6„Z1d7„ Z2d8„ Z3d9„ Z4d:„ Z5d;„ Z6ˆ fd<„Z7d=„ Z8d>„ Z9d?„ Z:d@„ Z;dA„ Z<ddBœdgdC„Z=dD„ Z>dE„ Z?dF„ Z@dG„ ZAdH„ ZBdI„ ZCdJ„ ZDdK„ ZEdL„ ZFdM„ ZGdN„ ZHdO„ ZIdP„ ZJdQ„ ZKdR„ ZLdS„ ZMdhdidT„ZNdhdidU„ZOdV„ ZPedWdXœdY„«       ZQdZ„ ZRd[„ ZSˆ xZTS )jÚ_StorageBaser   Ú_cdataFr   Ú	is_sparseÚis_sparse_csrztorch.deviceÚdeviceNú_Optional[torch.device]Ú_fake_devicez_Optional[int]Ú_checkpoint_offsetc                 ó   — y ©N© ©ÚselfÚargsÚkwargss      úK/var/www/skyplay_api_hub/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$   Údtyper9   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   r9   ©Útorchr   Úto©r$   r   r9   Údevice2s       r'   rE   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.
        ÚhpurF   rG   rJ   s       r'   rM   z_StorageBase.hpuc   s4   € ñ 28”%—,‘,˜u fÔ-¼U¿\¹\È%Ó=PˆØ�w‰w˜g°LˆwÓAÐAr)   c                ó   — t         ‚r!   r+   r-   s    r'   Úelement_sizez_StorageBase.element_sizer   r/   r)   c                ó.   — | j                   j                  S r!   )r   Úindexr-   s    r'   Ú
get_devicez_StorageBase.get_deviceu   s   € Ø�{‰{× Ñ Ð r)   c                ó   — t         ‚r!   r+   r-   s    r'   Údata_ptrz_StorageBase.data_ptrx   r/   r)   c                ó   — t         ‚r!   r+   r-   s    r'   Ú	resizablez_StorageBase.resizable{   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+   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               óz   — t        |t        j                  «      st        j                  |«      }t        | ||«      S r!   )rÛ   rH   r   r   )r$   r   r9   s      r'   rI   z_StorageBase.to  s-   € Ü˜&¤%§,¡,Ô/Ü—\‘\ &Ó)ˆFÜ�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.int1  s   € à�x‰xœŸ	™	Ó"Ð"r)   c                ó@   — | j                  t        j                  «      S ©z!Casts this storage to short type.)r   rH   Úshortr-   s    r'   rù   z_StorageBase.short5  rì   r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to char type.)r   rH   Úint8r-   s    r'   Úcharz_StorageBase.char9  rð   r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to byte type.)r   rH   rÞ   r-   s    r'   Úbytez_StorageBase.byte=  rì   r)   c                ó@   — | j                  t        j                  «      S ©z Casts this storage to bool type.)r   rH   Úboolr-   s    r'   r  z_StorageBase.boolA  rð   r)   c                ó@   — | j                  t        j                  «      S ©z$Casts this storage to bfloat16 type.)r   rH   Úbfloat16r-   s    r'   r  z_StorageBase.bfloat16E  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_doubleI  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_floatM  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_e5m2Q  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_e4m3fnU  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_e5m2fnuzY  ó   € à�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_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Ú   )rH   rÝ   rÞ   r   rß   r   r   Ú	is_pinned©r$   r   s     r'   r  z_StorageBase.is_pinneda  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   rC   rÜ   rH   rÝ   rÞ   rß   r   r   Ú
pin_memoryÚuntyped_storage)r$   r   Úpinned_tensors      r'   r   z_StorageBase.pin_memoryq  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@   r   r;  r
   ©r;  r
   )r@   r   ©r;  r=  )r   r   r9   r   ©rE   ©r   zUnion[str, torch.device])UÚ__name__Ú
__module__Ú__qualname__Ú__annotations__r   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Ó ØÓð -1€LÐ)Ó0à)-Ð˜Ó-òó"ò"ò"ô"ó"ó"óð CHð0Ø#ð0Ø:?ð0à	*ó0ð ).ðBà	*óBô"Bó"ó!ó"ó"ò"ò"ð ò"ó ð"ð ò"ó ð"ð ò"ó ð"ð ð Øñ	"ð 
ò	"ó ð	"ð ò"ó ð"ð ò"ó ð"ó"ò"ó"ó"ò"ò"ò"ó"ð ò"ó ð"ò"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ò"ó ð"ð ò"ó ð"ò"ó"ò*ò9òòò3ô
2òIòòòòð CHõ /ò
&ò%ò$ò$ò#ò%ò$ò%ò$ò(ò'ò&ò+ò-ò/ò/ô
ô /ò(
ð Ø).ó 
/ó ð
/òö"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)   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                  hS r!   )rH   r  r  r  r  Úfloat8_e8m0fnuÚbits8Úbits16Úbits1x8Úbits2x4Úbits4x2Ú	complex32Úuint16Úuint32Úuint64r"   r)   r'   Ú_new_dtypesrt    sz   € ô
 	×ÑÜ×ÑÜ×ÑÜ×ÑÜ×ÑÜ�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰Ü�‰ðð 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’  G  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™  M  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Ÿ  f  s(   € ÝÜ˜!œc¤2§:¡:Ð.Ó/Ð/ä˜!œSÓ!Ð!r)   c                 ó   — t         S r!   )Ú"_always_warn_typed_storage_removalr"   r)   r'   Ú&_get_always_warn_typed_storage_removalr¢  p  s   € Ü-Ð-r)   c                ó,   — t        | t        «      sJ ‚| ay r!   )rÛ   r  r¡  )Úalways_warns    r'   Ú&_set_always_warn_typed_storage_removalr¥  t  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_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()r3  )Ú
stacklevelTr¨  )r¢  ÚwarningsÚwarnÚUserWarningrª  r«  )r­  r¬  Úmessages      r'   rª  rª  z  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_cudag  s%   € ä#Ô%Ø×$Ñ$×+Ñ+×0Ñ0°FÑ:Ð:r)   c                ó\   — t        «        | j                  j                  j                  dk(  S ra  rÚ  r-   s    r'   r‡   zTypedStorage.is_hpul  s%   € ä#Ô%Ø×$Ñ$×+Ñ+×0Ñ0°EÑ9Ð9r)   c                ó.   — t        «        | j                  S )z2Return the internal :class:`torch.UntypedStorage`.)rª  r•  r-   s    r'   r0  zTypedStorage.untypedq  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_storagev  s]   € Ü�OÓ$¬×(<Ñ(<Ò<Ð<Ð<ä�‹:œÒ%ÜÜÜØ!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        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_index‡  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               óÐ  — 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 dtyperF   )rª  rÛ   rH   r   rB   rŠ  r‹  rŒ  r‰  rˆ  rÏ  rC   Úupperr•  rI   rß  )r$   r   r9   Ú
to_storages       r'   rI   zTypedStorage.to3  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ª  r5  r-   s    r'   rO   zTypedStorage.element_sizeD  s   € Ü#Ô%Ø×!Ñ!Ó#Ð#r)   c                óT   — t         j                  j                  | j                  «      S r!   )rH   r4  r5  rB   r-   s    r'   r5  zTypedStorage._element_sizeI  s   € Ü�|‰|×)Ñ)¨$¯*©*Ó5Ð5r)   c                óJ   — t        «        | j                  j                  «       S r!   )rª  r•  rR   r-   s    r'   rR   zTypedStorage.get_deviceL  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>Y  s   øè ø€ Ò'Q¸¬¨D°©G¯Ñ'Qùr¡   r¢   )
rª  rH   r£   rB   r   r¤   rC   r¥   r¦   r@   r§   s   `  r'   Ú__str__zTypedStorage.__str__P  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__\  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>b  r­   r®   )rª  r¯   r¦   r@   r-   s   `r'   r°   zTypedStorage.__iter__`  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__d  s(   € Ü#Ô%Ø×(Ñ(¬¯©°4×3HÑ3HÓ)IÓJÐJr)   c                ó8   — t        «        | j                  |«      S r!   )rª  Ú	_deepcopy©r$   r¶   s     r'   r¸   zTypedStorage.__deepcopy__h  s   € Ü#Ô%Ø�~‰~˜dÓ#Ð#r)   c                ó`   — | j                  t        j                  | j                  |«      «      S r!   )rß  r  Údeepcopyr•  r  s     r'   r  zTypedStorage._deepcopym  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__p  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.clonet  s(   € ä#Ô%Ø×(Ñ(¨×)>Ñ)>×)DÑ)DÓ)FÓGÐGr)   c                ó,   — t        «        t        | «      S rÏ   )rª  rÐ   r-   s    r'   rÑ   zTypedStorage.tolisty  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.
        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'   r1  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.long4  r:  r)   c                óT   — t        «        | j                  t        j                  «      S rõ   )rª  r   rH   rö   r-   s    r'   rö   zTypedStorage.int9  s   € ä#Ô%Ø�x‰xœŸ	™	Ó"Ð"r)   c                óT   — t        «        | j                  t        j                  «      S rø   )rª  r   rH   rù   r-   s    r'   rù   zTypedStorage.short>  r8  r)   c                óT   — t        «        | j                  t        j                  «      S rû   )rª  r   rH   rü   r-   s    r'   rý   zTypedStorage.charC  r:  r)   c                óT   — t        «        | j                  t        j                  «      S rÿ   )rª  r   rH   rÞ   r-   s    r'   r   zTypedStorage.byteH  r8  r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r  r-   s    r'   r  zTypedStorage.boolM  r:  r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r  r-   s    r'   r  zTypedStorage.bfloat16R  s   € ä#Ô%Ø�x‰xœŸ™Ó'Ð'r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r	  r-   s    r'   r
  zTypedStorage.complex_doubleW  s   € ä#Ô%Ø�x‰xœŸ™Ó&Ð&r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r  r-   s    r'   r  zTypedStorage.complex_float\  r6  r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e5m2a  s   € ä#Ô%Ø�x‰xœ×)Ñ)Ó*Ð*r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e4m3fnf  s   € ä#Ô%Ø�x‰xœ×+Ñ+Ó,Ð,r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e5m2fnuzk  ó   € ä#Ô%Ø�x‰xœ×-Ñ-Ó.Ð.r)   c                óT   — t        «        | j                  t        j                  «      S r  )rª  r   rH   r  r-   s    r'   r  zTypedStorage.float8_e4m3fnuzp  rG  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_fileu  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'   rQ  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¾  rM  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>  )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   r1  r   rç   rë   rï   ró   rö   rù   rý   r   r  r  r
  r  r  r  r  r  r‹   r�   rp   rw   ry   r{   r}   rQ  r   rX   rn   rZ  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ð 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¼  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  rg  r"   r)   r'   rd  rd  ã  s   … ØÓór)   rd  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!   rY  rc   s      r'   rZ  z#_LegacyStorage._release_ipc_counterö  r[  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.  rZ  rm  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_typerp    sE   € ðÜ)Ó+Ð,?Ñ@Ð@øÜò ÜØ#Ð$7Ð#8Ð8KÐLó
àð	ûðús   ‚ �	-˜(¨-)r2  )r¸  rœ   )r"  rœ   )AÚ
__future__r   rÑ  r  rV  r½   rM  r®  Útypingr   r   r   Ú	_Optionalr   r   r	   Útyping_extensionsr
   rH   Útorch._utilsr   r   Útorch.typesr   r   r   Útorch._prims_commonr   Ú__all__Únumpyrœ  r›  ÚModuleNotFoundErrorÚLockrL  r   rE  r   r   rX  r)  ÚStorageBaser   rÀ   Úcachert  r�  r’  r™  rŸ  r¡  r¢  r¥  rª  r³  rº  r   Ú__doc__rC   rE   rM   rI   rd  rÎ  rp  r"   r)   r'   ú<module>r     sÅ  ðö #ã Û Û Û 	Û Û ß R× RÝ "ã ß #ß ,Ñ ,ñ Ý2ð Ð+Ð
,€ðÛà€Ið $�Y—^‘^Ó%Ð Ø02Ð Ð-Ó 2áˆCÐ:Ô;€÷~"ñ ~"òB!ôH@=�U—X‘X×)Ñ)¨<ô @=òF9ð ‡�ñó ðð* ‡�ñó ðð6 ‡�ñó ðò
8ò2"ð &+Ð "ò.ò5óBò(?ó÷@ñ @ðF "ŸM™M€× Ñ Ô Ø(×-Ñ-×5Ñ5€× Ñ Ô Ø'×+Ñ+×3Ñ3€× Ñ Ô ØŸ+™+€‡�Ô ô	˜ô 	ô
�\Ð-?õ 
ô*øðM/ ò Ø€IØ	ƒBðús   ÁF' Æ'	F4Æ3F4