+
    Nåûj  ã                   óp  a € R t0 t ^ RIt^ RIt^ RIHt ^ RIt^ RIHt . ROt] ^ k R R lt	R R lt
]
! 4       '       Eg`   ]! ]P                  R	4      '       d	   ]! R
4      h]! ]P                  R4      '       d	   ]! R4      h]! ]P                  R4      '       d	   ]! R4      h]! ]P                  R4      '       d	   ]! R4      h]! ]P                  R4      '       d	   ]! R4      h]	! R4      ]P                  P                  R&   ]	! R	4      ]P                  P                  R	&   ]	! R4      ]P                  P                  R&   ]	! R4      ]P                  P                  R&   ]	! R4      ]P                  P                  R&   ]	! R4      ]P                  P                  R&   R R ltR R lt ! R R4      tR# )é    N)ÚCallable©ÚStorageÚGdsFilec                ó0   € V ^8„  d   QhR\         R\        /# )é   ÚnameÚreturn)Ústrr   )Úformats   "ÚJC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\torch\cuda\gds.pyÚ__annotate__r      s   € ÷ ñ ”Cð œHñ ó    c                 ó   a € V 3R  lpV# )c                  ó"   <€ \        R S R24      h)z	torch._C.z" is not supported on this platform)ÚRuntimeError)ÚargsÚkwargsr	   s   *,€r   ÚfnÚ_dummy_fn.<locals>.fn   s   ø€ Ü˜Y t fÐ,NÐOÓPÐPr   © )r	   r   s   f r   Ú	_dummy_fnr      s   ø€ õQð €Ir   c                ó$   € V ^8„  d   QhR\         /# )r   r
   )Úbool)r   s   "r   r   r      s   € ÷ ñ ”dñ r   c                 ó6   € \         P                  P                  # )zøReturn ``True`` if GPUDirect Storage (GDS) support is built in.

This requires a Linux build with ``USE_CUFILE`` enabled (the default) and
with cuFile (CUDA) or hipFile (ROCm) available at build time. See
:ref:`rocm-gds` for the ROCm requirements.
)ÚtorchÚ_CÚ_has_gdsr   r   r   Úis_availabler      s   € ô �8‰8×ÑÐr   Ú_gds_deregister_bufferz?_gds_deregister_buffer exists but _gds_register_buffer does notÚ_gds_register_handlez=_gds_register_handle exists but _gds_register_buffer does notÚ_gds_deregister_handlez?_gds_deregister_handle exists but _gds_register_buffer does notÚ_gds_load_storagez:_gds_load_storage exists but _gds_register_buffer does notÚ_gds_save_storagez:_gds_save_storage exists but _gds_register_buffer does notÚ_gds_register_bufferc                ó(   € V ^8„  d   QhR\         RR/# ©r   Úsr
   Nr   )r   s   "r   r   r   A   s   € ÷ %ñ %œ7ð % tñ %r   c                óD   € \         P                  P                  V 4       R# )ao  Registers a storage on a CUDA device as a GDS buffer.

This is a wrapper around ``cuFileBufRegister`` (CUDA) / ``hipFileBufRegister`` (ROCm).

Example::

    >>> # xdoctest: +SKIP("gds filesystem requirements")
    >>> src = torch.randn(1024, device="cuda")
    >>> s = src.untyped_storage()
    >>> gds_register_buffer(s)

Args:
    s (Storage): Buffer to register.
N)r   r   r%   ©r(   s   &r   Úgds_register_bufferr+   A   s   € ô 
‡H�H×!Ñ! !Ö$r   c                ó(   € V ^8„  d   QhR\         RR/# r'   r   )r   s   "r   r   r   S   s   € ÷ 'ñ 'œWð '¨ñ 'r   c                óD   € \         P                  P                  V 4       R# )aŽ  Deregisters a previously registered GDS buffer.

This is a wrapper around ``cuFileBufDeregister`` (CUDA) / ``hipFileBufDeregister`` (ROCm).

Example::

    >>> # xdoctest: +SKIP("gds filesystem requirements")
    >>> src = torch.randn(1024, device="cuda")
    >>> s = src.untyped_storage()
    >>> gds_register_buffer(s)
    >>> gds_deregister_buffer(s)

Args:
    s (Storage): Buffer to register.
N)r   r   r    r*   s   &r   Úgds_deregister_bufferr.   S   s   € ô  
‡H�H×#Ñ# AÖ&r   c                   ó˜   a € ] tR t^ft o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltRV 3R
 lR llt	RV 3R lR llt
RtV tR# )r   aè  Wrapper around a file registered with the GPUDirect Storage (GDS) driver.

cuFile (CUDA) and hipFile (ROCm) are file-like interfaces to the GDS API.

See the `cufile docs <https://docs.nvidia.com/gpudirect-storage/api-reference-guide/index.html#cufile-io-api>`_
and the `hipFile docs <https://rocm.docs.amd.com/projects/hipFile/en/latest/>`_
for more details, and :ref:`rocm-gds` for ROCm specifics.

Args:
    filename (str): Name of the file to open.
    flags (int): Flags to pass to ``os.open`` when opening the file. ``os.O_DIRECT`` will
        be added automatically.

Example::

    >>> # xdoctest: +SKIP("gds filesystem requirements")
    >>> src1 = torch.randn(1024, device="cuda")
    >>> src2 = torch.randn(2, 1024, device="cuda")
    >>> file = torch.cuda.gds.GdsFile(f, os.O_CREAT | os.O_RDWR)
    >>> file.save_storage(src1.untyped_storage(), offset=0)
    >>> file.save_storage(src2.untyped_storage(), offset=src1.nbytes)
    >>> dest1 = torch.empty(1024, device="cuda")
    >>> dest2 = torch.empty(2, 1024, device="cuda")
    >>> file.load_storage(dest1.untyped_storage(), offset=0)
    >>> file.load_storage(dest2.untyped_storage(), offset=src1.nbytes)
    >>> torch.equal(src1, dest1)
    True
    >>> torch.equal(src2, dest2)
    True

c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   ÚfilenameÚflags)r   Úint)r   Ú__classdict__s   "€r   r   ÚGdsFile.__annotate__‡   s   ø€ ÷ ñ ¡ð ©Sñ r   c                óì   € \         P                  R 8X  d   \        R4      hWn        W n        \
        P                  ! W\
        P                  ,          4      V n        RV n	        V P                  4        R# )Úwin32z*GdsFile is not supported on this platform.N)ÚsysÚplatformr   r1   r2   ÚosÚopenÚO_DIRECTÚfdÚhandleÚregister_handle)Úselfr1   r2   s   &&&r   Ú__init__ÚGdsFile.__init__‡   sP   € Ü�<‰<˜7Ô"ÜÐKÓLÐLØ ŒØŒ
Ü—'’'˜(¬B¯K©KÕ$7Ó8ˆŒØ"&ˆŒØ×ÑÖr   c                ó   <€ V ^8„  d   QhRR/# ©r   r
   Nr   )r   r4   s   "€r   r   r5   �   s   ø€ ÷ ñ ˜ñ r   c                ó‚   € V P                   e   V P                  4        \        P                  ! V P                  4       R # )N)r>   Úderegister_handler:   Úcloser=   ©r@   s   &r   Ú__del__ÚGdsFile.__del__�   s(   € Ø�;‰;Ò"Ø×"Ñ"Ô$Ü
�Š�—‘Ör   c                ó   <€ V ^8„  d   QhRR/# rD   r   )r   r4   s   "€r   r   r5   •   s   ø€ ÷ =ñ = ñ =r   c                ó”   € V P                   e   \        R4      h\        P                  P	                  V P
                  4      V n         R# )z‹Registers file descriptor to the GDS driver.

This is a wrapper around ``cuFileHandleRegister`` (CUDA) / ``hipFileHandleRegister`` (ROCm).
Nz4Cannot register a handle that is already registered.)r>   ÚAssertionErrorr   r   r!   r=   rH   s   &r   r?   ÚGdsFile.register_handle•   s4   € ð
 �;‰;Ò"Ü Ð!WÓXÐXÜ—h‘h×3Ñ3°D·G±GÓ<ˆŽr   c                ó   <€ V ^8„  d   QhRR/# rD   r   )r   r4   s   "€r   r   r5   ž   s   ø€ ÷ ñ  4ñ r   c                ó˜   € V P                   f   \        R4      h\        P                  P	                  V P                   4       RV n         R# )z“Deregisters file descriptor from the GDS driver.

This is a wrapper around ``cuFileHandleDeregister`` (CUDA) / ``hipFileHandleDeregister`` (ROCm).
Nz2Cannot deregister a handle that is not registered.)r>   rM   r   r   r"   rH   s   &r   rF   ÚGdsFile.deregister_handlež   s7   € ð
 �;‰;ÒÜ Ð!UÓVÐVÜ�‰×'Ñ'¨¯©Ô4ØˆŽr   c                ó*   <€ V ^8„  d   QhRS[ RS[RR/# ©r   ÚstorageÚoffsetr
   N©r   r3   )r   r4   s   "€r   r   r5   ¨   s'   ø€ ÷ Añ A¡Gð A±Sð AÀñ Ar   c                óŒ   € V P                   f   \        R4      h\        P                  P	                  V P                   W4       R# )a]  Loads data from the file into the storage.

This is a wrapper around ``cuFileRead`` (CUDA) / ``hipFileRead`` (ROCm).
``storage.nbytes()`` of data will be loaded from the file at ``offset``
into the storage.

Args:
    storage (Storage): Storage to load data into.
    offset (int, optional): Offset into the file to start loading from. (Default: 0)
Nz4Cannot load data from a file that is not registered.)r>   rM   r   r   r#   ©r@   rT   rU   s   &&&r   Úload_storageÚGdsFile.load_storage¨   s2   € ð �;‰;ÒÜ Ð!WÓXÐXÜ�‰×"Ñ" 4§;¡;°Ö@r   c                ó*   <€ V ^8„  d   QhRS[ RS[RR/# rS   rV   )r   r4   s   "€r   r   r5   ·   s'   ø€ ÷ Añ A¡Gð A±Sð AÀñ Ar   c                óŒ   € V P                   f   \        R4      h\        P                  P	                  V P                   W4       R# )aF  Saves data from the storage into the file.

This is a wrapper around ``cuFileWrite`` (CUDA) / ``hipFileWrite`` (ROCm).
All bytes of the storage will be written to the file at ``offset``.

Args:
    storage (Storage): Storage to save data from.
    offset (int, optional): Offset into the file to start saving to. (Default: 0)
Nz2Cannot save data to a file that is not registered.)r>   rM   r   r   r$   rX   s   &&&r   Úsave_storageÚGdsFile.save_storage·   s2   € ð �;‰;ÒÜ Ð!UÓVÐVÜ�‰×"Ñ" 4§;¡;°Ö@r   )r=   r1   r2   r>   N)r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rA   rI   r?   rF   rY   r]   Ú__static_attributes__Ú__classdictcell__)r4   s   @r   r   r   f   sQ   ø‡ € ñ÷@ð ÷ð ÷
=ð =÷ð ÷Aò A÷A÷ Að Ar   c                óV   € V ^8„  d   Qh/ ^ \         9   d   \        \        ,          ;R&   # )r   Ú__all__)Ú__conditional_annotations__Úlistr   )r   s   "r   r   r      s    € ‡	�	÷ò ŒŒc�ñ ò 
r   )r   r+   r.   r   )rh   r:   r8   Úcollections.abcr   r   Útorch.typesr   rg   r   r   Úhasattrr   rM   Ú__dict__r+   r.   r   r   )rh   s   @r   Ú<module>rn      s¤  øðß 	€	Û 
Ý $ã Ý ò€ó õõñ ‡~ƒ~Ùˆu�x‰xÐ1×2Ò2ÙØMó
ð 	
ñ ˆu�x‰xÐ/×0Ò0ÙØKó
ð 	
ñ ˆu�x‰xÐ1×2Ò2ÙØMó
ð 	
ñ ˆu�x‰xÐ,×-Ò-ÙØHó
ð 	
ñ ˆu�x‰xÐ,×-Ò-ÙØHó
ð 	
ñ 1:Ð:PÓ0Q€E‡H�H×ÑÐ,Ñ-Ù2;Ð<TÓ2U€E‡H�H×ÑÐ.Ñ/Ù09Ð:PÓ0Q€E‡H�H×ÑÐ,Ñ-Ù2;Ð<TÓ2U€E‡H�H×ÑÐ.Ñ/Ù-6Ð7JÓ-K€E‡H�H×ÑÐ)Ñ*Ù-6Ð7JÓ-K€E‡H�H×ÑÐ)Ñ*õ%õ$'÷&]Aó ]Ar   