From 6e55da296fbb86e22f0c22cd91b2f27f4c929fc9 Mon Sep 17 00:00:00 2001 From: Chenggang Zhao Date: Thu, 27 Feb 2025 10:42:46 +0800 Subject: [PATCH] Fix `python -O` mode issues --- deep_gemm/jit/compiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deep_gemm/jit/compiler.py b/deep_gemm/jit/compiler.py index 88260b4..0f099d8 100644 --- a/deep_gemm/jit/compiler.py +++ b/deep_gemm/jit/compiler.py @@ -136,7 +136,8 @@ def build(name: str, arg_defs: tuple, code: str) -> Runtime: *[f'-I{d}' for d in include_dirs]] if os.getenv('DG_JIT_DEBUG', None) or os.getenv('DG_JIT_PRINT_NVCC_COMMAND', False): print(f'Compiling JIT runtime {name} with command {command}') - assert subprocess.check_call(command) == 0, f'Failed to compile {src_path}' + return_code = subprocess.check_call(command) + assert return_code == 0, f'Failed to compile {src_path}' # Interleave FFMA reuse if enable_sass_opt: