mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-08 06:13:58 -05:00
chore(gpu): fix hl api filter for sanitizer tests and add core crypto ones
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
RUN_VALGRIND=0
|
||||
@@ -30,16 +30,15 @@ fi
|
||||
|
||||
# List the tests into a temporary file
|
||||
RUSTFLAGS="$RUSTFLAGS" cargo nextest list --cargo-profile "${CARGO_PROFILE}" \
|
||||
--features=integer,internal-keycache,gpu-debug,zk-pok -p "${TFHE_SPEC}" &> /tmp/test_list.txt
|
||||
|
||||
# Filter the tests to get only the HL ones
|
||||
TESTS_HL=$(sed -e $'s/\x1b\[[0-9;]*m//g' < /tmp/test_list.txt | grep 'high_level_api::booleans::tests::.*gpu.*' | grep -v 'array')
|
||||
--features=integer,internal-keycache,gpu-debug,zk-pok -p tfhe &> /tmp/test_list.txt
|
||||
|
||||
# Filter the tests to get only the HL and a subset of core crypto ones
|
||||
TESTS_TO_RUN=$(sed -e $'s/\x1b\[[0-9;]*m//g' < /tmp/test_list.txt | grep -E 'high_level_api::.*gpu.*|core_crypto::.*gpu.*' | grep -v 'array' | grep -v 'modulus_switch' | grep -v '3_3' | grep -v 'noise_distribution' | grep -v 'flip')
|
||||
|
||||
if [[ "${RUN_VALGRIND}" == "1" ]]; then
|
||||
# Build the tests but don't run them
|
||||
RUSTFLAGS="$RUSTFLAGS" cargo test --no-run --profile "${CARGO_PROFILE}" \
|
||||
--features=integer,internal-keycache,gpu-debug,zk-pok -p "${TFHE_SPEC}"
|
||||
--features=integer,internal-keycache,gpu-debug,zk-pok -p tfhe
|
||||
|
||||
# Find the test executable -> last one to have been modified
|
||||
EXECUTABLE=target/release/deps/$(find target/release/deps/ -type f -executable -name "tfhe-*" -printf "%T@ %f\n" |sort -nr|sed 's/^.* //; q;')
|
||||
@@ -54,15 +53,13 @@ if [[ "${RUN_VALGRIND}" == "1" ]]; then
|
||||
if [[ $VALGRIND_EXIT -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
done <<< "$TESTS_HL"
|
||||
done <<< "$TESTS_TO_RUN"
|
||||
fi
|
||||
|
||||
TESTS_HL=$(sed -e $'s/\x1b\[[0-9;]*m//g' < /tmp/test_list.txt | grep 'high_level_api::booleans::tests::.*gpu.*' | grep -v 'array')
|
||||
|
||||
if [[ "${RUN_COMPUTE_SANITIZER}" == "1" ]]; then
|
||||
# Build the tests but don't run them
|
||||
RUSTFLAGS="$RUSTFLAGS" cargo test --no-run --profile "${CARGO_PROFILE}" \
|
||||
--features=integer,internal-keycache,gpu,zk-pok -p "${TFHE_SPEC}"
|
||||
--features=integer,internal-keycache,gpu,zk-pok -p tfhe
|
||||
|
||||
# Find the test executable -> last one to have been modified
|
||||
EXECUTABLE=target/release/deps/$(find target/release/deps/ -type f -executable -name "tfhe-*" -printf "%T@ %f\n" |sort -nr|sed 's/^.* //; q;')
|
||||
@@ -78,7 +75,7 @@ if [[ "${RUN_COMPUTE_SANITIZER}" == "1" ]]; then
|
||||
if [[ $CS_EXIT -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
done <<< "$TESTS_HL"
|
||||
done <<< "$TESTS_TO_RUN"
|
||||
fi
|
||||
|
||||
exit $RESULT
|
||||
|
||||
Reference in New Issue
Block a user