From 0fab6324b93024347d372344823ce53ef0c89af8 Mon Sep 17 00:00:00 2001 From: Andrei Stoian Date: Mon, 5 Jan 2026 11:31:06 +0100 Subject: [PATCH] fix(gpu): memory sanitizer ci --- scripts/check_memory_errors.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/check_memory_errors.sh b/scripts/check_memory_errors.sh index 0f6298972..a7a2c7433 100755 --- a/scripts/check_memory_errors.sh +++ b/scripts/check_memory_errors.sh @@ -33,7 +33,11 @@ RUSTFLAGS="$RUSTFLAGS" cargo nextest list --cargo-profile "${CARGO_PROFILE}" \ --features=integer,internal-keycache,gpu-debug,zk-pok -p tfhe &> /tmp/test_list.txt if [[ "${RUN_VALGRIND}" == "1" ]]; then - TESTS_TO_RUN=$(sed -e $'s/\x1b\[[0-9;]*m//g' < /tmp/test_list.txt | grep -E 'high_level_api::.*gpu.*' | grep -v 'array' | grep -v 'flip') + # The tests are filtered using grep (to keep only HL) GPU tests. + # Since, when output is directed to a file, nextest outputs a list of ` ` the `grep -o '[^ ]\+$'` filter + # will keep only the test name and the `tfhe` executable is assumed. To sanitize tests from another + # executable changes might be needed + TESTS_TO_RUN=$(sed -e $'s/\x1b\[[0-9;]*m//g' < /tmp/test_list.txt | grep -E 'high_level_api::.*gpu.*' | grep -v 'array' | grep -v 'flip' | grep -o '[^ ]\+$') # Build the tests but don't run them RUSTFLAGS="$RUSTFLAGS" cargo test --no-run --profile "${CARGO_PROFILE}" \ @@ -56,7 +60,11 @@ if [[ "${RUN_VALGRIND}" == "1" ]]; then fi if [[ "${RUN_COMPUTE_SANITIZER}" == "1" ]]; then - 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') + # The tests are filtered using grep (to keep only HL / corecrypto) GPU tests. + # Since, when output is directed to a file, nextest outputs a list of ` ` the `grep -o '[^ ]\+$'` filter + # will keep only the test name and the `tfhe` executable is assumed. To sanitize tests from another + # executable changes might be needed + 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' | grep -o '[^ ]\+$') # 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