Skip to content

Commit

Permalink
chore(ci): enable AVX512 for integer and multi bit integer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IceTDrinker committed Oct 3, 2023
1 parent fad066a commit a258ff1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/aws_tfhe_integer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
CARGO_TERM_COLOR: always
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
RUSTFLAGS: "-C target-cpu=native"
AVX512_SUPPORT: "ON"

on:
# Allows you to run this workflow manually from the Actions tab as an alternative.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_tfhe_multi_bit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
CARGO_TERM_COLOR: always
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
RUSTFLAGS: "-C target-cpu=native"
AVX512_SUPPORT: "ON"

on:
# Allows you to run this workflow manually from the Actions tab as an alternative.
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -363,17 +363,17 @@ test_shortint_cov: install_rs_check_toolchain install_tarpaulin
-p tfhe -- shortint::

.PHONY: test_integer_ci # Run the tests for integer ci
test_integer_ci: install_rs_build_toolchain install_cargo_nextest
test_integer_ci: install_rs_check_toolchain install_cargo_nextest
BIG_TESTS_INSTANCE="$(BIG_TESTS_INSTANCE)" \
FAST_TESTS="$(FAST_TESTS)" \
./scripts/integer-tests.sh --rust-toolchain $(CARGO_RS_BUILD_TOOLCHAIN) \
./scripts/integer-tests.sh --rust-toolchain $(CARGO_RS_CHECK_TOOLCHAIN) \
--cargo-profile "$(CARGO_PROFILE)"

.PHONY: test_integer_multi_bit_ci # Run the tests for integer ci running only multibit tests
test_integer_multi_bit_ci: install_rs_build_toolchain install_cargo_nextest
test_integer_multi_bit_ci: install_rs_check_toolchain install_cargo_nextest
BIG_TESTS_INSTANCE="$(BIG_TESTS_INSTANCE)" \
FAST_TESTS="$(FAST_TESTS)" \
./scripts/integer-tests.sh --rust-toolchain $(CARGO_RS_BUILD_TOOLCHAIN) \
./scripts/integer-tests.sh --rust-toolchain $(CARGO_RS_CHECK_TOOLCHAIN) \
--cargo-profile "$(CARGO_PROFILE)" --multi-bit

.PHONY: test_integer # Run all the tests for integer
Expand Down
10 changes: 6 additions & 4 deletions scripts/integer-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ RUST_TOOLCHAIN="+stable"
multi_bit=""
not_multi_bit="_multi_bit"
cargo_profile="release"
# Normalize if it's set by the Makefile
AVX512_FEATURE="${AVX512_FEATURE:+${AVX512_FEATURE}}"

while [ -n "$1" ]
do
Expand Down Expand Up @@ -104,15 +106,15 @@ and not test(/.*default_add_sequence_multi_thread_param_message_3_carry_3_ks_pbs
--cargo-profile "${cargo_profile}" \
--package tfhe \
--profile ci \
--features="${ARCH_FEATURE}",integer,internal-keycache \
--features="${ARCH_FEATURE}",integer,internal-keycache,"${AVX512_FEATURE}" \
--test-threads "${n_threads}" \
-E "$filter_expression"

if [[ "${multi_bit}" == "" ]]; then
cargo "${RUST_TOOLCHAIN}" test \
--profile "${cargo_profile}" \
--package tfhe \
--features="${ARCH_FEATURE}",integer,internal-keycache \
--features="${ARCH_FEATURE}",integer,internal-keycache,"${AVX512_FEATURE}" \
--doc \
-- integer::
fi
Expand Down Expand Up @@ -148,15 +150,15 @@ and not test(/.*default_add_sequence_multi_thread_param_message_3_carry_3_ks_pbs
--cargo-profile "${cargo_profile}" \
--package tfhe \
--profile ci \
--features="${ARCH_FEATURE}",integer,internal-keycache \
--features="${ARCH_FEATURE}",integer,internal-keycache,"${AVX512_FEATURE}" \
--test-threads $num_threads \
-E "$filter_expression"

if [[ "${multi_bit}" == "" ]]; then
cargo "${RUST_TOOLCHAIN}" test \
--profile "${cargo_profile}" \
--package tfhe \
--features="${ARCH_FEATURE}",integer,internal-keycache \
--features="${ARCH_FEATURE}",integer,internal-keycache,"${AVX512_FEATURE}" \
--doc \
-- --test-threads="$(${nproc_bin})" integer::
fi
Expand Down

0 comments on commit a258ff1

Please sign in to comment.