@@ -1741,13 +1741,13 @@ def _init_extra_metrics() -> Dict[str, Any]:
1741
1741
self ._latency_with_compile_in_task = metrics .extra_metrics [
1742
1742
"_compile_time_in_task"
1743
1743
]
1744
- if "_ncu_trace_in_task " in self .required_metrics :
1744
+ if "single_run_in_task " in self .required_metrics :
1745
1745
assert (
1746
- self .required_metrics == ["_ncu_trace_in_task " ]
1746
+ self .required_metrics == ["single_run_in_task " ]
1747
1747
and len (self ._only ) == 1
1748
1748
and (self ._cur_input_id is not None )
1749
1749
), (
1750
- "_ncu_trace_in_task must be measured by itself. "
1750
+ "single_run_in_task must be measured by itself. "
1751
1751
f"required_metrics: { self .required_metrics } , _only: { self ._only } , _input_id: { self ._cur_input_id } "
1752
1752
)
1753
1753
from tritonbench .components .ncu import do_bench_in_task
@@ -1757,26 +1757,7 @@ def _init_extra_metrics() -> Dict[str, Any]:
1757
1757
grad_to_none = self .get_grad_to_none (self .example_inputs ),
1758
1758
range_name = _RANGE_NAME ,
1759
1759
)
1760
- metrics .extra_metrics ["_ncu_trace_in_task" ] = "success"
1761
- if "_nsys_rep_in_task" in self .required_metrics :
1762
- assert (
1763
- self .required_metrics == ["_nsys_rep_in_task" ]
1764
- and len (self ._only ) == 1
1765
- and (self ._cur_input_id is not None )
1766
- ), (
1767
- "_nsys_rep_in_task must be measured by itself. "
1768
- f"required_metrics: { self .required_metrics } , _only: { self ._only } , _input_id: { self ._cur_input_id } "
1769
- )
1770
- from tritonbench .components .ncu import do_bench_in_task
1771
-
1772
- do_bench_in_task (
1773
- fn = fn ,
1774
- grad_to_none = self .get_grad_to_none (self .example_inputs ),
1775
- range_name = _RANGE_NAME ,
1776
- warmup = True ,
1777
- use_cuda_profiler_range = True ,
1778
- )
1779
- metrics .extra_metrics ["_nsys_rep_in_task" ] = "success"
1760
+ metrics .extra_metrics ["single_run_in_task" ] = "success"
1780
1761
if self .tb_args .export :
1781
1762
export_data (
1782
1763
x_val = self .get_x_val (self .example_inputs ),
@@ -1929,7 +1910,7 @@ def _get_op_task_args(
1929
1910
return op_task_args
1930
1911
1931
1912
def nsys_rep (self , input_id : int , fn_name : str ) -> str :
1932
- op_task_args = self ._get_op_task_args (input_id , fn_name , "_nsys_rep_in_task " )
1913
+ op_task_args = self ._get_op_task_args (input_id , fn_name , "single_run_in_task " )
1933
1914
nsys_output_dir = self .get_temp_path (fn_name )
1934
1915
nsys_output_dir .mkdir (parents = True , exist_ok = True )
1935
1916
ext = ".nsys-rep"
@@ -1971,7 +1952,7 @@ def ncu_trace(
1971
1952
"full" ,
1972
1953
]
1973
1954
)
1974
- op_task_args = self ._get_op_task_args (input_id , fn_name , "_ncu_trace_in_task " )
1955
+ op_task_args = self ._get_op_task_args (input_id , fn_name , "single_run_in_task " )
1975
1956
# Disable DCGM
1976
1957
disable_dyno_dcgm = [
1977
1958
"sudo" ,
@@ -2052,7 +2033,7 @@ def service_exists(service_name):
2052
2033
return str (ncu_output_file .resolve ())
2053
2034
2054
2035
def att_trace (self , input_id : int , fn_name : str ) -> str :
2055
- op_task_args = self ._get_op_task_args (input_id , fn_name , "_ncu_trace_in_task " )
2036
+ op_task_args = self ._get_op_task_args (input_id , fn_name , "single_run_in_task " )
2056
2037
att_output_dir = self .get_temp_path (fn_name )
2057
2038
att_trace_dir = launch_att (att_output_dir , op_task_args )
2058
2039
return att_trace_dir
0 commit comments