From 4c10f95470a3f1205a6ccbcafca3db06f0c268dd Mon Sep 17 00:00:00 2001 From: David Berard Date: Fri, 31 May 2024 13:41:40 -0700 Subject: [PATCH] Add sys.executable to ncu command Previously, the ncu option would exit with code 255 for me: ``` python run_benchmark.py triton --op int4_gemm --metrics ncu_trace ``` For me, adding the python executable path into the command fixed this. --- torchbenchmark/util/triton_op.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchbenchmark/util/triton_op.py b/torchbenchmark/util/triton_op.py index f7b56701d0..2d06f3a1b6 100644 --- a/torchbenchmark/util/triton_op.py +++ b/torchbenchmark/util/triton_op.py @@ -817,7 +817,7 @@ def ncu_trace(self, input_id: int, fn_name: str, replay: bool=False) -> str: import subprocess from pathlib import Path - op_task_args = copy.deepcopy(sys.argv) + op_task_args = [sys.executable] + copy.deepcopy(sys.argv) for override_option in ["--only", "--input-id", "--num-inputs", "--metrics"]: op_task_args = _remove_params( op_task_args, _find_param_loc(op_task_args, override_option)