
    ciT                         d dl mZ d dlmZ dgZd Zde_        ed        Zedd       Zed        Z	ed	        Z
ed
        Zy)    )driver)constexpr_functioncurrent_targetc                  b    	 t         j                  } | j                         S # t        $ r Y y w xY w)N)r   activeRuntimeErrorget_current_target)active_drivers    U/var/www/html/engine/venv/lib/python3.12/site-packages/triton/language/target_info.pyr   r      s5     ++--  s   " 	..Tc                  @    t               } | d uxr | j                  dk(  S )Ncudar   backendtargets    r   is_cudar      s#    F:&..F"::    c                     t               }||j                  dk7  ryt        |j                  t              sJ |j                  | dz  |z   k\  S )z
    Determines whether we have compute capability >= (major, minor) and
    returns this as a constexpr boolean. This can be used for guarding
    inline asm implementations that require a certain compute capability.
    r   F
   )r   r   
isinstancearchint)majorminorr   s      r   cuda_capability_geqr      sK     F~61fkk3''';;%"*u,,,r   c                  @    t               } | d uxr | j                  dk(  S )Nhipr   r   s    r   is_hipr   '   s#    F9&..E"99r   c                  @    t               } | d uxr | j                  dk(  S )Ngfx942r   r   r   s    r   is_hip_cdna3r"   -   #    F9&++"99r   c                  @    t               } | d uxr | j                  dk(  S )Ngfx950r!   r   s    r   is_hip_cdna4r&   3   r#   r   N)r   )triton.runtimer   triton.runtime.jitr   __all__r   __triton_builtin__r   r   r   r"   r&    r   r   <module>r,      s    ! 1
. %) ! ; ;
 
- 
- : :
 : :
 : :r   