Ë
    ci%	  ã                   óB   — d d„ d„ d„ d„ dœiZ dddd	œZd
ddd	œZd„ Zd„ Zy)ÚCUDAc                 ó   — d| dz  z  S )Ng  ¸’2¼Cé   © ©ÚwidthÚkwargss     úO/var/www/html/engine/venv/lib/python3.12/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àœ/Ñ)ÜÐ4°[°MÐBÓCÐCà”? ;Ñ/Ñ/ÜÐ5°d°VÐ<Ó=Ð=ä  Ñ-¨dÑ3€Jáe W¸ÔDÐDr   c                 óH   — | 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   s?   € ð fÒØ9‰}Ð0Ñ0°3Ñ6¸Ñ:Ð:à˜eÒ#Ð#Ð#Ü˜tÑ$Ð$r   N)r   r&   r   r#   r)   r   r   r	   ú<module>r*      sQ   ðà
á4á<ñ	ñ 	pñ
ð€ð ØØñ€ð $(°4À4ÑHÐ òEó8%r   