§
    Pi%	  ã                   óD   — d d„ d„ d„ d„ dœiZ dddd	œZd
ddd	œZd„ Zd„ ZdS )ÚCUDAc                 ó   — d| dz  z  S )Ng  ¸’2¼Cé   © ©ÚwidthÚkwargss     úm/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/triton/profiler/specs.pyú<lambda>r
      s   €  ¨%°!©)Ñ 4€ ó    c                 ó   — d| dz  z  S )Ng €µbÆòBr   r   r   s     r	   r
   r
      s   €  °%¸!±)Ñ <€ r   c                 ó0   — |dz  |z  dz  dz  dz  | dz  z  S )Nér   g    xÇ:Aié  g   ¢”mBr   r   ©r   Únum_smsÚ
clock_rater   s       r	   r
   r
      s-   € °wÀ±}ÀzÑ7QÐU_Ñ7`ÐcgÑ7gÐkoÑ6oØ	‰ñ6€ r   c                 ó*   — |dz  |dz  z  dz  | dz  z  S )Ni @  ç     @@g    €„.Ar   r   r   s       r	   r
   r
      s'   € °gÀ±oÈÐVYÑIYÑ6ZÐ]`Ñ6`ÐejÐmnÑenÑ5o€ r   )Ú80Ú89Ú90Ú100g   èvH‡Bg   xH“Bg   ¢”B)Úgfx90aÚgfx942Úgfx950i   i   i    c                 ó   — | dk    rt           |         |z  |z  dz  |dz  z  S | t          vrt          d| › ¦  «        ‚|t          |          vrt          d|› ¦  «        ‚t          |          |         } ||||¬¦  «        S )aÎ  
    Calculate the maximum FLOPS for a given device type and width.

    Args:
        device_type (str): The type of device (e.g., "CUDA", "HIP").
        arch (str): The architecture of the device (e.g., "80", "90").
        width (int): The width in bits.
        num_sms (int): The number of streaming multiprocessors.
        clock_rate (float): The clock rate in GHz.

    Returns:
        float: The maximum FLOPS for the given device type and width.
    ÚHIPr   r   zUnsupported device type: zUnsupported architecture: )r   r   )Úamd_fp8_flops_by_archÚflops_by_deviceÚ
ValueError)Údevice_typeÚarchr   r   r   Ú
flops_funcs         r	   Ú	max_flopsr#      s¢   € ð eÒÐÝ$ TÔ*¨WÑ4°zÑAÀCÑGÈ5ÐSTÉ9ÑUÐUà/Ð)Ð)ÝÐB°[ÐBÐBÑCÔCÐCà•? ;Ô/Ð/Ð/ÝÐ<°dÐ<Ð<Ñ=Ô=Ð=å  Ô-¨dÔ3€Jàˆ:e W¸ÐDÑDÔDÐDr   c                 óT   — | dk    rd|z  |z  dz  dz  S | dk    sJ ‚t           |         S )a  
    Calculate the maximum bytes per second for a given bus width and memory clock rate.

    Args:
        bus_width (int): The bus width in bits.
        memory_clock_rate (float): The memory clock rate in GHz.

    Returns:
        float: The maximum bytes per second.
    r   é   r   r   r   )Úamd_bps_by_arch)r    r!   Ú	bus_widthÚmemory_clock_rates       r	   Úmax_bpsr)   6   sE   € ð fÒÐØ9‰}Ð0Ñ0°3Ñ6¸Ñ:Ð:à˜eÒ#Ð#Ð#Ð#Ý˜tÔ$Ð$r   N)r   r&   r   r#   r)   r   r   r	   ú<module>r*      sŒ   ðà
à4Ð4à<Ð<ð	ð 	ð 	pÐoð
ð 
ð€ð ØØðð €ð $(°4À4ÐHÐHÐ ðEð Eð Eð8%ð %ð %ð %ð %r   