Ë
    ÄÓ^jO  ã                   óÄ   — d dl mZ d dlmZmZ d dlZd dlmZ	 g d¢Z
defd„Zedefd„«       Zed	ed
edefd„«       Zedd
edefd„«       Zedefd„«       Zedefd„«       Zy)é    )Ú	lru_cache)ÚOptionalÚTYPE_CHECKINGN)ÚLibrary)Úget_core_countÚget_nameÚis_builtÚis_availableÚis_macos13_or_newerÚis_macos_or_newerÚreturnc                  ó6   — t         j                  j                  S )zóReturn whether PyTorch is built with MPS support.

    Note that this doesn't necessarily mean MPS is available; just that
    if this PyTorch binary were run a machine with working MPS drivers
    and devices, we would be able to use it.
    )ÚtorchÚ_CÚ_has_mps© ó    úf/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/torch/backends/mps/__init__.pyr	   r	      s   € ô �8‰8×ÑÐr   c                  ó>   — t         j                  j                  «       S )z7Return a bool indicating if MPS is currently available.)r   r   Ú_mps_is_availabler   r   r   r
   r
      s   € ô �8‰8×%Ñ%Ó'Ð'r   ÚmajorÚminorc                 óB   — t         j                  j                  | |«      S )zHReturn a bool indicating whether MPS is running on given MacOS or newer.©r   r   Ú_mps_is_on_macos_or_newer)r   r   s     r   r   r   "   s   € ô �8‰8×-Ñ-¨e°UÓ;Ð;r   c                 óB   — t         j                  j                  d| «      S )zEReturn a bool indicating whether MPS is running on MacOS 13 or newer.é   r   )r   s    r   r   r   (   s   € ô �8‰8×-Ñ-¨b°%Ó8Ð8r   c                  ó>   — t         j                  j                  «       S )zReturn Metal device name)r   r   Ú_mps_get_namer   r   r   r   r   .   s   € ô �8‰8×!Ñ!Ó#Ð#r   c                  ó>   — t         j                  j                  «       S )zõReturn GPU core count.

    According to the documentation, one core is comprised of 16 Execution Units.
    One execution Unit has 8 ALUs.
    And one ALU can run 24 threads, i.e. one core is capable of executing 3072 threads concurrently.
    )r   r   Ú_mps_get_core_countr   r   r   r   r   4   s   € ô �8‰8×'Ñ'Ó)Ð)r   )r   )Ú	functoolsr   Ú
_lru_cacheÚtypingr   r   r   Útorch.libraryr   Ú_LibraryÚ__all__Úboolr	   r
   Úintr   r   Ústrr   r   r   r   r   ú<module>r+      sÀ   ðÝ -ß *ã Ý -ò€ð�$ó ð ð(�dò (ó ð(ð
 ð<˜Sð <¨ð <°ò <ó ð<ð
 ñ9˜sð 9¨4ò 9ó ð9ð
 ð$�#ò $ó ð$ð
 ð*˜ò *ó ñ*r   