Tiny print launch command with shlex (#16010)

This commit is contained in:
Liangsheng Yin
2025-12-29 11:26:46 +08:00
committed by GitHub
parent 2ec6fa3c54
commit a435f55d18
4 changed files with 11 additions and 7 deletions
@@ -1,12 +1,13 @@
"""
This generates gpu kernel analysis output from nsys rep. Will call nsys
stats -r cuda_gpu_kern_trace, get non-overlapped gpu cycles, then generate
csv and html output for analysis
This generates gpu kernel analysis output from nsys rep. Will call nsys
stats -r cuda_gpu_kern_trace, get non-overlapped gpu cycles, then generate
csv and html output for analysis
"""
import argparse
import logging
import os
import shlex
import regex as re
@@ -223,7 +224,7 @@ class GPUTrace2Graph:
"-o",
f"{file_dir}/{file_name}",
]
cmd_str = " ".join(cmd)
cmd_str = shlex.join(cmd)
logger.info("+ %s", cmd_str)
# estimate time based on calibrated 240M/min
file_size_mb = os.path.getsize(file) / 1e6