Skip to content

Commit 96950a5

Browse files
authored
Try to turn off DEBUG mode when building for release (pytorch#7914)
1 parent d073a19 commit 96950a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

setup.py

+3
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ def get_extensions():
223223
extra_compile_args["nvcc"] = [f for f in nvcc_flags if not ("-O" in f or "-g" in f)]
224224
extra_compile_args["nvcc"].append("-O0")
225225
extra_compile_args["nvcc"].append("-g")
226+
else:
227+
print("Compiling with debug mode OFF")
228+
extra_compile_args["cxx"].append("-g0")
226229

227230
sources = [os.path.join(extensions_dir, s) for s in sources]
228231

0 commit comments

Comments
 (0)