10000 Update on "[cutlass backend] Reduce log level for cutlass runtime error" · pytorch/pytorch@2896e50 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2896e50

Browse files
committed
Update on "[cutlass backend] Reduce log level for cutlass runtime error"
Want to make sure we always call self.cleanup_run_fn() even if we crash. I think this is the reason why sometimes we get ``` in _dlclose TypeError: 'NoneType' object is not callable ``` Differential Revision: [D74629230](https://our.internmc.facebook.com/intern/diff/D74629230/) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
2 parents 1943c71 + 272cc71 commit 2896e50

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

torch/_inductor/autotune_process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,11 +733,11 @@ def make_run_fn(
733733
except RuntimeError as e:
734734
err_msg = str(e)
735735

736-
def dummy_function():
736+
def raise_runtime_error():
737737
raise RuntimeError(err_msg)
738738

739739
self.cleanup_run_fn()
740-
return dummy_function
740+
return raise_runtime_error
741741

742742
return ret
743743

torch/_inductor/select_algorithm.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,14 +2269,15 @@ def benchmark_choices(
22692269

22702270
if not isinstance(choice, CUDATemplateCaller):
22712271
log.error(
2272-
"CUDA compilation error during autotuning: \n%s. \nIgnoring this choice.",
2272+
"CUDA runtime error during autotuning: \n%s. \nIgnoring this choice.",
22732273
e,
22742274
)
22752275
msg = str(e)
22762276
if "invalid argument" in msg:
22772277
msg += "\n\nThis may mean this GPU is too small for max_autotune mode.\n\n"
2278-
elif "illegal memory access" in msg:
2279-
msg += "\n\nEither error in template or triton bug.\n"
2278+
else:
2279+
if "illegal memory access" in msg:
2280+
msg += "\n\nEither error in template or triton bug.\n"
22802281

22812282
if isinstance(choice, CUDATemplateCaller):
22822283
log.debug(

0 commit comments

Comments
 (0)
0