mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
chore(gpu): fix hl api filter for sanitizer tests and add core crypto ones
This commit is contained in:
2
Makefile
2
Makefile
@@ -735,13 +735,11 @@ test_integer_gpu_debug:
|
|||||||
.PHONY: test_high_level_api_gpu_valgrind # Run the tests of the integer module with Debug flags for CUDA
|
.PHONY: test_high_level_api_gpu_valgrind # Run the tests of the integer module with Debug flags for CUDA
|
||||||
test_high_level_api_gpu_valgrind: install_cargo_nextest
|
test_high_level_api_gpu_valgrind: install_cargo_nextest
|
||||||
export RUSTFLAGS="-C target-cpu=x86-64" && \
|
export RUSTFLAGS="-C target-cpu=x86-64" && \
|
||||||
export TFHE_SPEC="tfhe" && \
|
|
||||||
export CARGO_PROFILE="$(CARGO_PROFILE)" && scripts/check_memory_errors.sh --cpu
|
export CARGO_PROFILE="$(CARGO_PROFILE)" && scripts/check_memory_errors.sh --cpu
|
||||||
|
|
||||||
.PHONY: test_high_level_api_gpu_sanitizer # Run the tests of the integer module with Debug flags for CUDA
|
.PHONY: test_high_level_api_gpu_sanitizer # Run the tests of the integer module with Debug flags for CUDA
|
||||||
test_high_level_api_gpu_sanitizer: install_cargo_nextest
|
test_high_level_api_gpu_sanitizer: install_cargo_nextest
|
||||||
export RUSTFLAGS="-C target-cpu=x86-64" && \
|
export RUSTFLAGS="-C target-cpu=x86-64" && \
|
||||||
export TFHE_SPEC="tfhe" && \
|
|
||||||
export CARGO_PROFILE="$(CARGO_PROFILE)" && scripts/check_memory_errors.sh --gpu
|
export CARGO_PROFILE="$(CARGO_PROFILE)" && scripts/check_memory_errors.sh --gpu
|
||||||
|
|
||||||
.PHONY: test_integer_hl_test_gpu_check_warnings
|
.PHONY: test_integer_hl_test_gpu_check_warnings
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -x
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
RUN_VALGRIND=0
|
RUN_VALGRIND=0
|
||||||
@@ -30,16 +30,15 @@ fi
|
|||||||
|
|
||||||
# List the tests into a temporary file
|
# List the tests into a temporary file
|
||||||
RUSTFLAGS="$RUSTFLAGS" cargo nextest list --cargo-profile "${CARGO_PROFILE}" \
|
RUSTFLAGS="$RUSTFLAGS" cargo nextest list --cargo-profile "${CARGO_PROFILE}" \
|
||||||
--features=integer,internal-keycache,gpu-debug,zk-pok -p "${TFHE_SPEC}" &> /tmp/test_list.txt
|
--features=integer,internal-keycache,gpu-debug,zk-pok -p tfhe &> /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')
|
|
||||||
|
|
||||||
|
# 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
|
if [[ "${RUN_VALGRIND}" == "1" ]]; then
|
||||||
# Build the tests but don't run them
|
# Build the tests but don't run them
|
||||||
RUSTFLAGS="$RUSTFLAGS" cargo test --no-run --profile "${CARGO_PROFILE}" \
|
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
|
# 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;')
|
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
|
if [[ $VALGRIND_EXIT -ne 0 ]]; then
|
||||||
RESULT=1
|
RESULT=1
|
||||||
fi
|
fi
|
||||||
done <<< "$TESTS_HL"
|
done <<< "$TESTS_TO_RUN"
|
||||||
fi
|
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
|
if [[ "${RUN_COMPUTE_SANITIZER}" == "1" ]]; then
|
||||||
# Build the tests but don't run them
|
# Build the tests but don't run them
|
||||||
RUSTFLAGS="$RUSTFLAGS" cargo test --no-run --profile "${CARGO_PROFILE}" \
|
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
|
# 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;')
|
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
|
if [[ $CS_EXIT -ne 0 ]]; then
|
||||||
RESULT=1
|
RESULT=1
|
||||||
fi
|
fi
|
||||||
done <<< "$TESTS_HL"
|
done <<< "$TESTS_TO_RUN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
|
|||||||
Reference in New Issue
Block a user