chore: use script to pull hpu files

This commit is contained in:
Nicolas Sarlin
2025-07-04 16:55:22 +02:00
committed by Nicolas Sarlin
parent 57cbab9fe1
commit 7bcd6b94da
4 changed files with 12 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ jobs:
- name: Run benchmarks - name: Run benchmarks
run: | run: |
git lfs pull --include="*" --exclude="" make pull_hpu_files
make bench_integer_hpu make bench_integer_hpu
make bench_hlapi_erc20_hpu make bench_hlapi_erc20_hpu

View File

@@ -1515,9 +1515,13 @@ write_params_to_file: install_rs_check_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) run \ RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) run \
--example write_params_to_file --features=boolean,shortint,hpu,internal-keycache --example write_params_to_file --features=boolean,shortint,hpu,internal-keycache
.PHONY: pull_backward_compat_data # Clone the data repo needed for backward compatibility tests .PHONY: pull_backward_compat_data # Pull the data files needed for backward compatibility tests
pull_backward_compat_data: pull_backward_compat_data:
./scripts/pull_backward_compat_data.sh $(BACKWARD_COMPAT_DATA_DIR) ./scripts/pull_lfs_data.sh $(BACKWARD_COMPAT_DATA_DIR)
.PHONY: pull_hpu_files # Pull the hpu files
pull_hpu_files:
./scripts/pull_lfs_data.sh backends/tfhe-hpu-backend/
# #
# Real use case examples # Real use case examples

View File

@@ -201,9 +201,9 @@ There are some example applications already available in `tfhe/examples/hpu`:
In order to run those applications on hardware, user must build from the project root (i.e `tfhe-rs-internal`) with `hpu-v80` features: In order to run those applications on hardware, user must build from the project root (i.e `tfhe-rs-internal`) with `hpu-v80` features:
> NB: Running examples required to have correctly pulled the `.hpu` files. Those files, due to their size, are backed by git-lfs and disabled by default. > NB: Running examples required to have correctly pulled the `.hpu` files. Those files, due to their size, are backed by git-lfs and disabled by default.
> In order to retrieve them, use the following command: > In order to retrieve them, run the following command from **TFHE-rs** root folder:
> ```bash > ```bash
> git lfs pull --include="*.hpu" --exclude="" > make pull_hpu_files
> ``` > ```
``` bash ``` bash
@@ -217,7 +217,7 @@ source setup_hpu.sh --config v80
> NB: Error that occurred when ".hpu" files weren't correctly fetch could be a bit enigmatic: `memory allocation of ... bytes failed` > NB: Error that occurred when ".hpu" files weren't correctly fetch could be a bit enigmatic: `memory allocation of ... bytes failed`
> If you encountered this issue, you should run the following command: > If you encountered this issue, you should run the following command:
> ```bash > ```bash
> git lfs pull --include="*.hpu" --exclude="" > make pull_hpu_files
> ``` > ```

View File

@@ -4,7 +4,7 @@ set -e
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo "invalid arguments, usage:\n" echo "invalid arguments, usage:\n"
echo "$0 dest_path" echo "$0 <data_path>"
exit 1 exit 1
fi fi
@@ -13,4 +13,4 @@ if ! git lfs env 2>/dev/null >/dev/null; then
exit 1 exit 1
fi fi
git lfs pull --include="$1/*" --exclude="*.hpu" git lfs pull --include="$1/*" --exclude=""