mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 22:57:59 -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
|
exit 0
|
||||||
fi
|
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
|
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
|
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
|
fi
|
||||||
|
|||||||
@@ -67,14 +67,7 @@ fi
|
|||||||
CURR_DIR="$(dirname "$0")"
|
CURR_DIR="$(dirname "$0")"
|
||||||
ARCH_FEATURE="$("${CURR_DIR}/get_arch_feature.sh")"
|
ARCH_FEATURE="$("${CURR_DIR}/get_arch_feature.sh")"
|
||||||
|
|
||||||
nproc_bin=nproc
|
n_threads_small="$("${CURR_DIR}"/cpu_count.sh)"
|
||||||
|
|
||||||
# macOS detects CPUs differently
|
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
|
||||||
nproc_bin="sysctl -n hw.logicalcpu"
|
|
||||||
fi
|
|
||||||
|
|
||||||
n_threads_small="$(${nproc_bin})"
|
|
||||||
n_threads_big="${n_threads_small}"
|
n_threads_big="${n_threads_small}"
|
||||||
|
|
||||||
# TODO: automate thread selection by measuring host machine ram and loading the key sizes from the
|
# TODO: automate thread selection by measuring host machine ram and loading the key sizes from the
|
||||||
|
|||||||
Reference in New Issue
Block a user