Compare commits

...

1 Commits

Author SHA1 Message Date
6826ac8dd4 [Inductor] add cuda compile cmd to autotuning logging
ghstack-source-id: 76182a46f585aa7372e2001584cafe70d0846c42
Pull Request resolved: https://github.com/pytorch/pytorch/pull/160906
2025-08-18 11:32:27 -07:00

View File

@ -144,6 +144,7 @@ _IS_WINDOWS = sys.platform == "win32"
LOCK_TIMEOUT = 600
output_code_log = torch._logging.getArtifactLogger(__name__, "output_code")
autotuning_log = torch._logging.getArtifactLogger(__name__, "autotuning")
log = logging.getLogger(__name__)
@ -3736,7 +3737,10 @@ def cuda_compile_command(
res = f"{_cuda_compiler()} {' '.join(options)} -o {dst_file} {src_file}"
else:
raise NotImplementedError(f"Unsupported output file suffix {dst_file_ext}!")
log.debug("CUDA command: %s", res)
if log.isEnabledFor(logging.DEBUG):
log.debug("CUDA command: %s", res)
else:
autotuning_log.debug("CUDA command: %s", res)
return res