File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,10 @@ if [[ "${BUILD_ONLY}" == "1" ]]; then
61
61
exit 0
62
62
fi
63
63
64
- nproc_bin=nproc
65
64
66
- # macOS detects CPUs differently
67
- if [[ $( uname) == " Darwin" ]]; then
68
- nproc_bin=" sysctl -n hw.logicalcpu"
69
- fi
70
65
71
66
if [ " ${WITH_FEATURE_GPU} " == " ON" ]; then
72
- ctest --output-on-failure --test-dir " ." --parallel " $( ${nproc_bin} ) " --tests-regex " .*cuda.*"
67
+ ctest --output-on-failure --test-dir " ." --parallel " ${CPU_COUNT} " --tests-regex " .*cuda.*"
73
68
else
74
- ctest --output-on-failure --test-dir " ." --parallel " $( ${nproc_bin} ) " --exclude-regex " .*cuda.*"
69
+ ctest --output-on-failure --test-dir " ." --parallel " ${CPU_COUNT} " --exclude-regex " .*cuda.*"
75
70
fi
Original file line number Diff line number Diff line change 67
67
CURR_DIR=" $( dirname " $0 " ) "
68
68
ARCH_FEATURE=" $( " ${CURR_DIR} /get_arch_feature.sh" ) "
69
69
70
- nproc_bin=nproc
71
-
72
- # macOS detects CPUs differently
73
- if [[ $( uname) == " Darwin" ]]; then
74
- nproc_bin=" sysctl -n hw.logicalcpu"
75
- fi
76
-
77
- n_threads_small=" $( ${nproc_bin} ) "
70
+ n_threads_small=" $( " ${CURR_DIR} " /cpu_count.sh) "
78
71
n_threads_big=" ${n_threads_small} "
79
72
80
73
# TODO: automate thread selection by measuring host machine ram and loading the key sizes from the
You can’t perform that action at this time.
0 commit comments