mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-08 06:13:58 -05:00
chore(ci): use cpu_count.sh where possible
This commit is contained in:
@@ -61,15 +61,10 @@ if [[ "${BUILD_ONLY}" == "1" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
nproc_bin=nproc
|
||||
|
||||
# macOS detects CPUs differently
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
nproc_bin="sysctl -n hw.logicalcpu"
|
||||
fi
|
||||
|
||||
if [ "${WITH_FEATURE_GPU}" == "ON" ]; then
|
||||
ctest --output-on-failure --test-dir "." --parallel "$(${nproc_bin})" --tests-regex ".*cuda.*"
|
||||
ctest --output-on-failure --test-dir "." --parallel "${CPU_COUNT}" --tests-regex ".*cuda.*"
|
||||
else
|
||||
ctest --output-on-failure --test-dir "." --parallel "$(${nproc_bin})" --exclude-regex ".*cuda.*"
|
||||
ctest --output-on-failure --test-dir "." --parallel "${CPU_COUNT}" --exclude-regex ".*cuda.*"
|
||||
fi
|
||||
|
||||
@@ -67,14 +67,7 @@ fi
|
||||
CURR_DIR="$(dirname "$0")"
|
||||
ARCH_FEATURE="$("${CURR_DIR}/get_arch_feature.sh")"
|
||||
|
||||
nproc_bin=nproc
|
||||
|
||||
# macOS detects CPUs differently
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
nproc_bin="sysctl -n hw.logicalcpu"
|
||||
fi
|
||||
|
||||
n_threads_small="$(${nproc_bin})"
|
||||
n_threads_small="$("${CURR_DIR}"/cpu_count.sh)"
|
||||
n_threads_big="${n_threads_small}"
|
||||
|
||||
# TODO: automate thread selection by measuring host machine ram and loading the key sizes from the
|
||||
|
||||
Reference in New Issue
Block a user