mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[AOTI] Print out error msg when nvcc compiler fails (#157203)
Summary: To debug https://github.com/pytorch/pytorch/issues/156930. Not able to reproduce the problem locally. Pull Request resolved: https://github.com/pytorch/pytorch/pull/157203 Approved by: https://github.com/jansel Co-authored-by: Jason Ansel <jansel@meta.com>
This commit is contained in:
parent
86ced14453
commit
771be85704
|
|
@ -2143,9 +2143,19 @@ class AotCodeCompiler:
|
|||
# Include SASS for the current specific arch
|
||||
f"-gencode arch=compute_{current_arch},code=sm_{current_arch} "
|
||||
)
|
||||
subprocess.run(
|
||||
cmd.split(), capture_output=True, text=True, check=True
|
||||
)
|
||||
try:
|
||||
subprocess.run(
|
||||
cmd.split(),
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True,
|
||||
)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(
|
||||
f"{cmd} failed with:\nstdout:\n{e.stdout}\nstderr:\n{e.stderr}",
|
||||
file=sys.stderr,
|
||||
)
|
||||
raise
|
||||
|
||||
if config.aot_inductor.embed_kernel_binary:
|
||||
# Embed cubin files into model.so using objcopy
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user