Skip to content

Commit fe02e2e

Browse files
committed
Get available thread count
1 parent 8c6fc52 commit fe02e2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def build_isa_l():
8686
subprocess.run(os.path.join(build_dir, "autogen.sh"), **run_args)
8787
subprocess.run([os.path.join(build_dir, "configure"),
8888
"--prefix", temp_prefix], **run_args)
89-
subprocess.run(["make", "-j", str(os.cpu_count())], **run_args)
89+
subprocess.run(["make", "-j", str(len(os.sched_getaffinity(0)))],
90+
**run_args)
9091
subprocess.run(["make", "install"], **run_args)
9192
shutil.rmtree(build_dir)
9293
return temp_prefix

0 commit comments

Comments
 (0)