
    Ji%	                     B    S S S S S S.0r SSSS	.rS
SSS	.rS rS rg)CUDAc                     SU S-  -  $ )Ng  2C    widthkwargss     W/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/triton/profiler/specs.py<lambda>r
      s    %!) 4    c                     SU S-  -  $ )Ng bBr   r   r   s     r	   r
   r
      s    %!) <r   c                 0    US-  U-  S-  S-  S-  U S-  -  $ )Nr   g    x:Ai  g   mBr   r   r   num_sms
clock_rater   s       r	   r
   r
      s+    w}z7QU_7`cg7gko6o	6r   c                 *    US-  US-  -  S-  U S-  -  $ )Ni @       @@g    .Ar   r   r   s       r	   r
   r
      s%    goVYIY6Z]`6`ejmnen5or   )808990100g   vHBg   xHBg   B)gfx90agfx942gfx950i   i   i    c                     U S:X  a  [         U   U-  U-  S-  US-  -  $ U [        ;  a  [        SU  35      eU[        U    ;  a  [        SU 35      e[        U    U   nU" X#US9$ )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4zACG5ST9UU/)4[MBCC?;//5dV<== -d3JeDDr   c                 L    U S:X  a  SU-  U-  S-  S-  $ U S:X  d   e[         U   $ )z
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036::e###t$$r   N)r   r&   r   r#   r)   r   r   r	   <module>r*      sQ   
4<	 	p
  $(44H E8%r   