File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,8 @@ def check_if_cuda_home_none(global_option: str) -> None:
8181 )
8282
8383
84- def append_nvcc_threads (nvcc_extra_args ):
85- return nvcc_extra_args + ["--threads" , "4" ]
86-
84+ def append_nvcc_threads ():
85+ return ["--threads" , os .getenv ("NVCC_THREADS" ) or "4" ]
8786
8887cmdclass = {}
8988ext_modules = []
@@ -132,7 +131,7 @@ def append_nvcc_threads(nvcc_extra_args):
132131 ],
133132 extra_compile_args = {
134133 "cxx" : ["-O3" ],
135- "nvcc" : append_nvcc_threads (
134+ "nvcc" :
136135 [
137136 "-O3" ,
138137 "-U__CUDA_NO_HALF_OPERATORS__" ,
@@ -147,8 +146,8 @@ def append_nvcc_threads(nvcc_extra_args):
147146 "--ptxas-options=-v" ,
148147 "-lineinfo" ,
149148 ]
150- + cc_flag
151- ) ,
149+ + append_nvcc_threads ()
150+ + cc_flag ,
152151 },
153152 include_dirs = [this_dir ],
154153 )
You can’t perform that action at this time.
0 commit comments