From 548f2e5d05ffcadb0b00344f6b6e71730dcd8e0a Mon Sep 17 00:00:00 2001 From: Agnes Leroy Date: Mon, 22 Jan 2024 13:52:02 +0100 Subject: [PATCH] chore(gpu): fix gpu package for publication --- Makefile | 2 +- backends/tfhe-cuda-backend/{rust_api => }/Cargo.toml | 0 backends/tfhe-cuda-backend/{rust_api => }/LICENSE | 2 +- backends/tfhe-cuda-backend/{implementation => }/README.md | 0 backends/tfhe-cuda-backend/{rust_api => }/build.rs | 2 +- .../{implementation => cuda}/.cmake-format-config.py | 0 .../tfhe-cuda-backend/{implementation => cuda}/CMakeLists.txt | 0 backends/tfhe-cuda-backend/{implementation => cuda}/CPPLINT.cfg | 0 .../tfhe-cuda-backend/{implementation => cuda}/check_cuda.cu | 0 .../{implementation => cuda}/format_tfhe_cuda_backend.sh | 0 .../{implementation => cuda}/include/bootstrap.h | 0 .../{implementation => cuda}/include/bootstrap_multibit.h | 0 .../{implementation => cuda}/include/ciphertext.h | 0 .../tfhe-cuda-backend/{implementation => cuda}/include/device.h | 0 .../{implementation => cuda}/include/helper_debug.cuh | 0 .../{implementation => cuda}/include/integer.h | 0 .../{implementation => cuda}/include/keyswitch.h | 0 .../{implementation => cuda}/include/linear_algebra.h | 0 .../{implementation => cuda}/src/CMakeLists.txt | 0 .../{implementation => cuda}/src/crypto/ciphertext.cu | 0 .../{implementation => cuda}/src/crypto/ciphertext.cuh | 0 .../{implementation => cuda}/src/crypto/gadget.cuh | 0 .../{implementation => cuda}/src/crypto/ggsw.cuh | 0 .../{implementation => cuda}/src/crypto/keyswitch.cu | 0 .../{implementation => cuda}/src/crypto/keyswitch.cuh | 0 .../{implementation => cuda}/src/crypto/torus.cuh | 0 .../tfhe-cuda-backend/{implementation => cuda}/src/device.cu | 0 .../{implementation => cuda}/src/fft/bnsmfft.cuh | 0 .../{implementation => cuda}/src/fft/twiddles.cu | 0 .../{implementation => cuda}/src/fft/twiddles.cuh | 0 .../{implementation => cuda}/src/integer/bitwise_ops.cu | 0 .../{implementation => cuda}/src/integer/bitwise_ops.cuh | 0 .../{implementation => cuda}/src/integer/cmux.cu | 0 .../{implementation => cuda}/src/integer/cmux.cuh | 0 .../{implementation => cuda}/src/integer/comparison.cu | 0 .../{implementation => cuda}/src/integer/comparison.cuh | 0 .../{implementation => cuda}/src/integer/integer.cu | 0 .../{implementation => cuda}/src/integer/integer.cuh | 0 .../{implementation => cuda}/src/integer/multiplication.cu | 0 .../{implementation => cuda}/src/integer/multiplication.cuh | 0 .../{implementation => cuda}/src/integer/negation.cu | 0 .../{implementation => cuda}/src/integer/negation.cuh | 0 .../{implementation => cuda}/src/integer/scalar_addition.cu | 0 .../{implementation => cuda}/src/integer/scalar_addition.cuh | 0 .../{implementation => cuda}/src/integer/scalar_bitops.cu | 0 .../{implementation => cuda}/src/integer/scalar_bitops.cuh | 0 .../{implementation => cuda}/src/integer/scalar_comparison.cu | 0 .../{implementation => cuda}/src/integer/scalar_comparison.cuh | 0 .../{implementation => cuda}/src/integer/scalar_rotate.cu | 0 .../{implementation => cuda}/src/integer/scalar_rotate.cuh | 0 .../{implementation => cuda}/src/integer/scalar_shifts.cu | 0 .../{implementation => cuda}/src/integer/scalar_shifts.cuh | 0 .../{implementation => cuda}/src/integer/shifts.cuh | 0 .../{implementation => cuda}/src/linearalgebra/addition.cu | 0 .../{implementation => cuda}/src/linearalgebra/addition.cuh | 0 .../src/linearalgebra/multiplication.cu | 0 .../src/linearalgebra/multiplication.cuh | 0 .../{implementation => cuda}/src/linearalgebra/negation.cu | 0 .../{implementation => cuda}/src/linearalgebra/negation.cuh | 0 .../{implementation => cuda}/src/pbs/bootstrap.cu | 0 .../{implementation => cuda}/src/pbs/bootstrap_amortized.cu | 0 .../{implementation => cuda}/src/pbs/bootstrap_amortized.cuh | 0 .../src/pbs/bootstrap_fast_low_latency.cuh | 0 .../src/pbs/bootstrap_fast_multibit.cuh | 0 .../{implementation => cuda}/src/pbs/bootstrap_low_latency.cu | 0 .../{implementation => cuda}/src/pbs/bootstrap_low_latency.cuh | 0 .../{implementation => cuda}/src/pbs/bootstrap_multibit.cu | 0 .../{implementation => cuda}/src/pbs/bootstrap_multibit.cuh | 0 .../{implementation => cuda}/src/pbs/bootstrapping_key.cuh | 0 .../{implementation => cuda}/src/polynomial/functions.cuh | 0 .../{implementation => cuda}/src/polynomial/parameters.cuh | 0 .../{implementation => cuda}/src/polynomial/polynomial_math.cuh | 0 .../{implementation => cuda}/src/types/complex/operations.cuh | 0 .../{implementation => cuda}/src/types/int128.cuh | 0 .../{implementation => cuda}/src/utils/helper.cuh | 0 .../{implementation => cuda}/src/utils/kernel_dimensions.cuh | 0 backends/tfhe-cuda-backend/{rust_api => }/get_os_name.sh | 0 backends/tfhe-cuda-backend/{rust_api => }/src/cuda_bind.rs | 0 backends/tfhe-cuda-backend/{rust_api => }/src/lib.rs | 0 tfhe/Cargo.toml | 2 +- 80 files changed, 4 insertions(+), 4 deletions(-) rename backends/tfhe-cuda-backend/{rust_api => }/Cargo.toml (100%) rename backends/tfhe-cuda-backend/{rust_api => }/LICENSE (98%) rename backends/tfhe-cuda-backend/{implementation => }/README.md (100%) rename backends/tfhe-cuda-backend/{rust_api => }/build.rs (95%) rename backends/tfhe-cuda-backend/{implementation => cuda}/.cmake-format-config.py (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/CMakeLists.txt (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/CPPLINT.cfg (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/check_cuda.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/format_tfhe_cuda_backend.sh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/bootstrap.h (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/bootstrap_multibit.h (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/ciphertext.h (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/device.h (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/helper_debug.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/integer.h (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/keyswitch.h (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/include/linear_algebra.h (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/CMakeLists.txt (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/crypto/ciphertext.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/crypto/ciphertext.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/crypto/gadget.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/crypto/ggsw.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/crypto/keyswitch.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/crypto/keyswitch.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/crypto/torus.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/device.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/fft/bnsmfft.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/fft/twiddles.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/fft/twiddles.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/bitwise_ops.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/bitwise_ops.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/cmux.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/cmux.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/comparison.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/comparison.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/integer.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/integer.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/multiplication.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/multiplication.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/negation.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/negation.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_addition.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_addition.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_bitops.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_bitops.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_comparison.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_comparison.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_rotate.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_rotate.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_shifts.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/scalar_shifts.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/integer/shifts.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/linearalgebra/addition.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/linearalgebra/addition.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/linearalgebra/multiplication.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/linearalgebra/multiplication.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/linearalgebra/negation.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/linearalgebra/negation.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_amortized.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_amortized.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_fast_low_latency.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_fast_multibit.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_low_latency.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_low_latency.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_multibit.cu (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrap_multibit.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/pbs/bootstrapping_key.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/polynomial/functions.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/polynomial/parameters.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/polynomial/polynomial_math.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/types/complex/operations.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/types/int128.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/utils/helper.cuh (100%) rename backends/tfhe-cuda-backend/{implementation => cuda}/src/utils/kernel_dimensions.cuh (100%) rename backends/tfhe-cuda-backend/{rust_api => }/get_os_name.sh (100%) rename backends/tfhe-cuda-backend/{rust_api => }/src/cuda_bind.rs (100%) rename backends/tfhe-cuda-backend/{rust_api => }/src/lib.rs (100%) diff --git a/Makefile b/Makefile index f6647123c5..b4c71dffda 100644 --- a/Makefile +++ b/Makefile @@ -144,7 +144,7 @@ fmt: install_rs_check_toolchain .PHONY: fmt_gpu # Format rust and cuda code fmt_gpu: install_rs_check_toolchain cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" fmt - cd backends/tfhe-cuda-backend/implementation/ && ./format_tfhe_cuda_backend.sh + cd "$(TFHECUDA_SRC)" && ./format_tfhe_cuda_backend.sh .PHONY: check_fmt # Check rust code format check_fmt: install_rs_check_toolchain diff --git a/backends/tfhe-cuda-backend/rust_api/Cargo.toml b/backends/tfhe-cuda-backend/Cargo.toml similarity index 100% rename from backends/tfhe-cuda-backend/rust_api/Cargo.toml rename to backends/tfhe-cuda-backend/Cargo.toml diff --git a/backends/tfhe-cuda-backend/rust_api/LICENSE b/backends/tfhe-cuda-backend/LICENSE similarity index 98% rename from backends/tfhe-cuda-backend/rust_api/LICENSE rename to backends/tfhe-cuda-backend/LICENSE index c04b2b2365..3b74a7595f 100644 --- a/backends/tfhe-cuda-backend/rust_api/LICENSE +++ b/backends/tfhe-cuda-backend/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause Clear License -Copyright © 2023 ZAMA. +Copyright © 2024 ZAMA. All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/backends/tfhe-cuda-backend/implementation/README.md b/backends/tfhe-cuda-backend/README.md similarity index 100% rename from backends/tfhe-cuda-backend/implementation/README.md rename to backends/tfhe-cuda-backend/README.md diff --git a/backends/tfhe-cuda-backend/rust_api/build.rs b/backends/tfhe-cuda-backend/build.rs similarity index 95% rename from backends/tfhe-cuda-backend/rust_api/build.rs rename to backends/tfhe-cuda-backend/build.rs index 7a1a2219a3..95ce40300a 100644 --- a/backends/tfhe-cuda-backend/rust_api/build.rs +++ b/backends/tfhe-cuda-backend/build.rs @@ -12,7 +12,7 @@ fn main() { Only Ubuntu is supported by tfhe-cuda-backend at this time. Build may fail\n" ); } - let dest = cmake::build("../implementation"); + let dest = cmake::build("cuda"); println!("cargo:rustc-link-search=native={}", dest.display()); println!("cargo:rustc-link-lib=static=tfhe_cuda_backend"); println!("cargo:rustc-link-search=native=/usr/local/cuda/lib64"); diff --git a/backends/tfhe-cuda-backend/implementation/.cmake-format-config.py b/backends/tfhe-cuda-backend/cuda/.cmake-format-config.py similarity index 100% rename from backends/tfhe-cuda-backend/implementation/.cmake-format-config.py rename to backends/tfhe-cuda-backend/cuda/.cmake-format-config.py diff --git a/backends/tfhe-cuda-backend/implementation/CMakeLists.txt b/backends/tfhe-cuda-backend/cuda/CMakeLists.txt similarity index 100% rename from backends/tfhe-cuda-backend/implementation/CMakeLists.txt rename to backends/tfhe-cuda-backend/cuda/CMakeLists.txt diff --git a/backends/tfhe-cuda-backend/implementation/CPPLINT.cfg b/backends/tfhe-cuda-backend/cuda/CPPLINT.cfg similarity index 100% rename from backends/tfhe-cuda-backend/implementation/CPPLINT.cfg rename to backends/tfhe-cuda-backend/cuda/CPPLINT.cfg diff --git a/backends/tfhe-cuda-backend/implementation/check_cuda.cu b/backends/tfhe-cuda-backend/cuda/check_cuda.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/check_cuda.cu rename to backends/tfhe-cuda-backend/cuda/check_cuda.cu diff --git a/backends/tfhe-cuda-backend/implementation/format_tfhe_cuda_backend.sh b/backends/tfhe-cuda-backend/cuda/format_tfhe_cuda_backend.sh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/format_tfhe_cuda_backend.sh rename to backends/tfhe-cuda-backend/cuda/format_tfhe_cuda_backend.sh diff --git a/backends/tfhe-cuda-backend/implementation/include/bootstrap.h b/backends/tfhe-cuda-backend/cuda/include/bootstrap.h similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/bootstrap.h rename to backends/tfhe-cuda-backend/cuda/include/bootstrap.h diff --git a/backends/tfhe-cuda-backend/implementation/include/bootstrap_multibit.h b/backends/tfhe-cuda-backend/cuda/include/bootstrap_multibit.h similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/bootstrap_multibit.h rename to backends/tfhe-cuda-backend/cuda/include/bootstrap_multibit.h diff --git a/backends/tfhe-cuda-backend/implementation/include/ciphertext.h b/backends/tfhe-cuda-backend/cuda/include/ciphertext.h similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/ciphertext.h rename to backends/tfhe-cuda-backend/cuda/include/ciphertext.h diff --git a/backends/tfhe-cuda-backend/implementation/include/device.h b/backends/tfhe-cuda-backend/cuda/include/device.h similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/device.h rename to backends/tfhe-cuda-backend/cuda/include/device.h diff --git a/backends/tfhe-cuda-backend/implementation/include/helper_debug.cuh b/backends/tfhe-cuda-backend/cuda/include/helper_debug.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/helper_debug.cuh rename to backends/tfhe-cuda-backend/cuda/include/helper_debug.cuh diff --git a/backends/tfhe-cuda-backend/implementation/include/integer.h b/backends/tfhe-cuda-backend/cuda/include/integer.h similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/integer.h rename to backends/tfhe-cuda-backend/cuda/include/integer.h diff --git a/backends/tfhe-cuda-backend/implementation/include/keyswitch.h b/backends/tfhe-cuda-backend/cuda/include/keyswitch.h similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/keyswitch.h rename to backends/tfhe-cuda-backend/cuda/include/keyswitch.h diff --git a/backends/tfhe-cuda-backend/implementation/include/linear_algebra.h b/backends/tfhe-cuda-backend/cuda/include/linear_algebra.h similarity index 100% rename from backends/tfhe-cuda-backend/implementation/include/linear_algebra.h rename to backends/tfhe-cuda-backend/cuda/include/linear_algebra.h diff --git a/backends/tfhe-cuda-backend/implementation/src/CMakeLists.txt b/backends/tfhe-cuda-backend/cuda/src/CMakeLists.txt similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/CMakeLists.txt rename to backends/tfhe-cuda-backend/cuda/src/CMakeLists.txt diff --git a/backends/tfhe-cuda-backend/implementation/src/crypto/ciphertext.cu b/backends/tfhe-cuda-backend/cuda/src/crypto/ciphertext.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/crypto/ciphertext.cu rename to backends/tfhe-cuda-backend/cuda/src/crypto/ciphertext.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/crypto/ciphertext.cuh b/backends/tfhe-cuda-backend/cuda/src/crypto/ciphertext.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/crypto/ciphertext.cuh rename to backends/tfhe-cuda-backend/cuda/src/crypto/ciphertext.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/crypto/gadget.cuh b/backends/tfhe-cuda-backend/cuda/src/crypto/gadget.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/crypto/gadget.cuh rename to backends/tfhe-cuda-backend/cuda/src/crypto/gadget.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/crypto/ggsw.cuh b/backends/tfhe-cuda-backend/cuda/src/crypto/ggsw.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/crypto/ggsw.cuh rename to backends/tfhe-cuda-backend/cuda/src/crypto/ggsw.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/crypto/keyswitch.cu b/backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/crypto/keyswitch.cu rename to backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/crypto/keyswitch.cuh b/backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/crypto/keyswitch.cuh rename to backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/crypto/torus.cuh b/backends/tfhe-cuda-backend/cuda/src/crypto/torus.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/crypto/torus.cuh rename to backends/tfhe-cuda-backend/cuda/src/crypto/torus.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/device.cu b/backends/tfhe-cuda-backend/cuda/src/device.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/device.cu rename to backends/tfhe-cuda-backend/cuda/src/device.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/fft/bnsmfft.cuh b/backends/tfhe-cuda-backend/cuda/src/fft/bnsmfft.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/fft/bnsmfft.cuh rename to backends/tfhe-cuda-backend/cuda/src/fft/bnsmfft.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/fft/twiddles.cu b/backends/tfhe-cuda-backend/cuda/src/fft/twiddles.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/fft/twiddles.cu rename to backends/tfhe-cuda-backend/cuda/src/fft/twiddles.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/fft/twiddles.cuh b/backends/tfhe-cuda-backend/cuda/src/fft/twiddles.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/fft/twiddles.cuh rename to backends/tfhe-cuda-backend/cuda/src/fft/twiddles.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/bitwise_ops.cu b/backends/tfhe-cuda-backend/cuda/src/integer/bitwise_ops.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/bitwise_ops.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/bitwise_ops.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/bitwise_ops.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/bitwise_ops.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/bitwise_ops.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/bitwise_ops.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/cmux.cu b/backends/tfhe-cuda-backend/cuda/src/integer/cmux.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/cmux.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/cmux.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/cmux.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/cmux.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/cmux.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/cmux.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/comparison.cu b/backends/tfhe-cuda-backend/cuda/src/integer/comparison.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/comparison.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/comparison.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/comparison.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/comparison.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/comparison.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/comparison.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/integer.cu b/backends/tfhe-cuda-backend/cuda/src/integer/integer.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/integer.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/integer.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/integer.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/integer.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/integer.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/integer.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/multiplication.cu b/backends/tfhe-cuda-backend/cuda/src/integer/multiplication.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/multiplication.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/multiplication.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/multiplication.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/multiplication.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/multiplication.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/multiplication.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/negation.cu b/backends/tfhe-cuda-backend/cuda/src/integer/negation.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/negation.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/negation.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/negation.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/negation.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/negation.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/negation.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_addition.cu b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_addition.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_addition.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_addition.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_addition.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_addition.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_addition.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_addition.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_bitops.cu b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_bitops.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_bitops.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_bitops.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_bitops.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_bitops.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_bitops.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_bitops.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_comparison.cu b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_comparison.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_comparison.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_comparison.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_comparison.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_comparison.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_comparison.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_comparison.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_rotate.cu b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_rotate.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_rotate.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_rotate.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_rotate.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_rotate.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_rotate.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_rotate.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_shifts.cu b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_shifts.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_shifts.cu rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_shifts.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/scalar_shifts.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/scalar_shifts.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/scalar_shifts.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/scalar_shifts.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/integer/shifts.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/shifts.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/integer/shifts.cuh rename to backends/tfhe-cuda-backend/cuda/src/integer/shifts.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/linearalgebra/addition.cu b/backends/tfhe-cuda-backend/cuda/src/linearalgebra/addition.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/linearalgebra/addition.cu rename to backends/tfhe-cuda-backend/cuda/src/linearalgebra/addition.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/linearalgebra/addition.cuh b/backends/tfhe-cuda-backend/cuda/src/linearalgebra/addition.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/linearalgebra/addition.cuh rename to backends/tfhe-cuda-backend/cuda/src/linearalgebra/addition.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/linearalgebra/multiplication.cu b/backends/tfhe-cuda-backend/cuda/src/linearalgebra/multiplication.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/linearalgebra/multiplication.cu rename to backends/tfhe-cuda-backend/cuda/src/linearalgebra/multiplication.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/linearalgebra/multiplication.cuh b/backends/tfhe-cuda-backend/cuda/src/linearalgebra/multiplication.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/linearalgebra/multiplication.cuh rename to backends/tfhe-cuda-backend/cuda/src/linearalgebra/multiplication.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/linearalgebra/negation.cu b/backends/tfhe-cuda-backend/cuda/src/linearalgebra/negation.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/linearalgebra/negation.cu rename to backends/tfhe-cuda-backend/cuda/src/linearalgebra/negation.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/linearalgebra/negation.cuh b/backends/tfhe-cuda-backend/cuda/src/linearalgebra/negation.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/linearalgebra/negation.cuh rename to backends/tfhe-cuda-backend/cuda/src/linearalgebra/negation.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap.cu b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap.cu rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_amortized.cu b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_amortized.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_amortized.cu rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_amortized.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_amortized.cuh b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_amortized.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_amortized.cuh rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_amortized.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_fast_low_latency.cuh b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_fast_low_latency.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_fast_low_latency.cuh rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_fast_low_latency.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_fast_multibit.cuh b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_fast_multibit.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_fast_multibit.cuh rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_fast_multibit.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_low_latency.cu b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_low_latency.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_low_latency.cu rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_low_latency.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_low_latency.cuh b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_low_latency.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_low_latency.cuh rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_low_latency.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_multibit.cu b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_multibit.cu similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_multibit.cu rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_multibit.cu diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_multibit.cuh b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_multibit.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrap_multibit.cuh rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrap_multibit.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/pbs/bootstrapping_key.cuh b/backends/tfhe-cuda-backend/cuda/src/pbs/bootstrapping_key.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/pbs/bootstrapping_key.cuh rename to backends/tfhe-cuda-backend/cuda/src/pbs/bootstrapping_key.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/polynomial/functions.cuh b/backends/tfhe-cuda-backend/cuda/src/polynomial/functions.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/polynomial/functions.cuh rename to backends/tfhe-cuda-backend/cuda/src/polynomial/functions.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/polynomial/parameters.cuh b/backends/tfhe-cuda-backend/cuda/src/polynomial/parameters.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/polynomial/parameters.cuh rename to backends/tfhe-cuda-backend/cuda/src/polynomial/parameters.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/polynomial/polynomial_math.cuh b/backends/tfhe-cuda-backend/cuda/src/polynomial/polynomial_math.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/polynomial/polynomial_math.cuh rename to backends/tfhe-cuda-backend/cuda/src/polynomial/polynomial_math.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/types/complex/operations.cuh b/backends/tfhe-cuda-backend/cuda/src/types/complex/operations.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/types/complex/operations.cuh rename to backends/tfhe-cuda-backend/cuda/src/types/complex/operations.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/types/int128.cuh b/backends/tfhe-cuda-backend/cuda/src/types/int128.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/types/int128.cuh rename to backends/tfhe-cuda-backend/cuda/src/types/int128.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/utils/helper.cuh b/backends/tfhe-cuda-backend/cuda/src/utils/helper.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/utils/helper.cuh rename to backends/tfhe-cuda-backend/cuda/src/utils/helper.cuh diff --git a/backends/tfhe-cuda-backend/implementation/src/utils/kernel_dimensions.cuh b/backends/tfhe-cuda-backend/cuda/src/utils/kernel_dimensions.cuh similarity index 100% rename from backends/tfhe-cuda-backend/implementation/src/utils/kernel_dimensions.cuh rename to backends/tfhe-cuda-backend/cuda/src/utils/kernel_dimensions.cuh diff --git a/backends/tfhe-cuda-backend/rust_api/get_os_name.sh b/backends/tfhe-cuda-backend/get_os_name.sh similarity index 100% rename from backends/tfhe-cuda-backend/rust_api/get_os_name.sh rename to backends/tfhe-cuda-backend/get_os_name.sh diff --git a/backends/tfhe-cuda-backend/rust_api/src/cuda_bind.rs b/backends/tfhe-cuda-backend/src/cuda_bind.rs similarity index 100% rename from backends/tfhe-cuda-backend/rust_api/src/cuda_bind.rs rename to backends/tfhe-cuda-backend/src/cuda_bind.rs diff --git a/backends/tfhe-cuda-backend/rust_api/src/lib.rs b/backends/tfhe-cuda-backend/src/lib.rs similarity index 100% rename from backends/tfhe-cuda-backend/rust_api/src/lib.rs rename to backends/tfhe-cuda-backend/src/lib.rs diff --git a/tfhe/Cargo.toml b/tfhe/Cargo.toml index 924aabfea3..a36a6747a2 100644 --- a/tfhe/Cargo.toml +++ b/tfhe/Cargo.toml @@ -62,7 +62,7 @@ rayon = { version = "1.5.0" } bincode = "1.3.3" concrete-fft = { version = "0.3.0", features = ["serde", "fft128"] } pulp = "0.13" -tfhe-cuda-backend = {path = "../backends/tfhe-cuda-backend/rust_api", optional = true} +tfhe-cuda-backend = {path = "../backends/tfhe-cuda-backend", optional = true} aligned-vec = { version = "0.5", features = ["serde"] } dyn-stack = { version = "0.9" } paste = "1.0.7"