
    gg	                     $    S SK r S rS rS rS rg)    Nc                      g)NTemplateRuleSpeedup r       Gnsight-compute-2025.1.1/extras/RuleTemplates/SpeedupWithFocusMetrics.pyget_identifierr      s     r   c                      g)NzSpeedup Estimation Templater   r   r   r   get_namer
      s    (r   c                      g)NzBA rule template containing a speedup estimation and focus metrics.r   r   r   r   get_descriptionr      s    Or   c                    [         R                  " U 5      nUR                  S5      R                  S5      nUR	                  5       nSnSnX$   R                  5       nX%   R                  5       nXg:  a  SnSU-
  n	OSnSU-
  n	UR                  [         R                  R                  SR                  U5      S5      n
UR                  U
[         R                  R                  U	5        UR                  U
UU[         R                  R                  S	5        UR                  U
UU[         R                  R                  S
5        g )Nr   z0sm__throughput.avg.pct_of_peak_sustained_elapsedz@gpu__compute_memory_throughput.avg.pct_of_peak_sustained_elapsedcomputed   memoryz)This kernel is currently dominated by {}.zCompute vs MemoryzIncrease the compute throughputzIncrease the memory throughput)NvRulesget_contextrange_by_idxaction_by_idxfrontendvaluemessage	IFrontendMsgType_MSG_OPTIMIZATIONformatspeedupSpeedupType_GLOBALfocus_metricSeverity_SEVERITY_DEFAULT)handlectxactionr   compute_throughput_namememory_throughput_namecompute_throughputmemory_throughputdominated_byimprovement_percent
message_ids              r   applyr)      sE   


f
%Ca ..q1F||~H QJ   8>>@6<<> - !$66!$55
 !!223::<HJ G%%88:M 33) 33(r   )r   r   r
   r   r)   r   r   r   <module>r*      s    !)P6r   