+
    ˜°³j¹  ã                   ó‚   € R t ^ RIHt ^ RIt^RIHtHt ^RIHt RR R llt	RR R llt
RR	 R
 lltRR R llt. ROtR# )zKThis package adds support for device memory management implemented in MTIA.)ÚAnyN)ÚDeviceÚis_initialized)Ú_get_device_indexc                óR   € V ^8„  d   QhR\         R\        \        \        3,          /# ©é   ÚdeviceÚreturn)r   ÚdictÚstrr   )Úformats   "ÚR/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/mtia/memory.pyÚ__annotate__r      s&   € ÷ 
Pñ 
Pœð 
P¬4´´S°­>ñ 
Pó    c                óz   € \        4       '       g   / # \        P                  P                  \	        V RR7      4      # )a  Return a dictionary of MTIA memory allocator statistics for a given device.

Args:
    device (torch.device, str, or int, optional) selected device. Returns
        statistics for the current device, given by current_device(),
        if device is None (default).
T©Úoptional)r   ÚtorchÚ_CÚ_mtia_memoryStatsr   ©r	   s   &r   Úmemory_statsr      s/   € ô ×ÒØˆ	Ü�8‰8×%Ñ%Ô&7¸ÈÔ&NÓOÐOr   c                ó0   € V ^8„  d   QhR\         R\        /# r   ©r   Úint)r   s   "r   r   r      s   € ÷ 
Dñ 
D¤ð 
D´3ñ 
Dr   c                ó|   € \        4       '       g   ^ # \        V 4      P                  R^ 4      P                  R^ 4      # )zýReturn the maximum memory allocated in bytes for a given device.

Args:
    device (torch.device, str, or int, optional) selected device. Returns
        statistics for the current device, given by current_device(),
        if device is None (default).
ÚdramÚ
peak_bytes©r   r   Úgetr   s   &r   Úmax_memory_allocatedr!      s5   € ô ×ÒÙÜ˜Ó×#Ñ# F¨AÓ.×2Ñ2°<ÀÓCÐCr   c                ó0   € V ^8„  d   QhR\         R\        /# r   r   )r   s   "r   r   r   '   s   € ÷ 
Iñ 
IœVð 
I¬sñ 
Ir   c                ó|   € \        4       '       g   ^ # \        V 4      P                  R^ 4      P                  R^ 4      # )a+  Return the current MTIA memory occupied by tensors in bytes for a given device.

Args:
    device (torch.device or int or str, optional): selected device. Returns
        statistic for the current device, given by :func:`~torch.mtia.current_device`,
        if :attr:`device` is ``None`` (default).
r   Úallocated_bytesr   r   s   &r   Úmemory_allocatedr%   '   s6   € ô ×ÒÙÜ˜Ó×#Ñ# F¨AÓ.×2Ñ2Ð3DÀaÓHÐHr   c                ó(   € V ^8„  d   QhR\         RR/# )r   r	   r
   N)r   )r   s   "r   r   r   4   s   € ÷ Rñ R¤Fð R°dñ Rr   c                ó~   € \        4       '       g   R# \        P                  P                  \	        V RR7      4       R# )zíReset the peak memory stats for a given device.


Args:
    device (torch.device, str, or int, optional) selected device. Returns
        statistics for the current device, given by current_device(),
        if device is None (default).
NTr   )r   r   r   Ú_mtia_resetPeakMemoryStatsr   r   s   &r   Úreset_peak_memory_statsr)   4   s*   € ô ×ÒÙÜ	‡H�H×'Ñ'Ô(9¸&È4Ô(PÖQr   )N)r   r!   r%   r)   )Ú__doc__Útypingr   r   Ú r   r   Ú_utilsr   r   r!   r%   r)   Ú__all__© r   r   Ú<module>r0      s6   ðñ Så ã ç $Ý %÷
P÷
D÷
I÷Rò‚r   