Commit Graph

786 Commits

Author SHA1 Message Date
Quentin Bourgerie
351bab0bc9 chore(tests): Add a make target for testing gpu 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
735e78c141 chore(bench): Use batched concrete operators for gpu benchmarks 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
33a0d1b9e9 chore(bench): Add a first warmup call 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
3c616af622 feat(compiler): Handle batched operators for gpu codegen 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
312c9281eb chore(gpu): Fix gpu compilation 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
71b24b1255 chore(ci/bench): Generate gpu benchmarks 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
0602fe64ce chore(cuda): Update concrete-core to remove pedantic warning 2022-12-07 21:32:01 +01:00
David Testé
2c48bdd9fe test(benchmark): execute on-demand benchmarks with gpu backend
When this type of benchmarks is triggered, only the tests that
benefits from GPU acceleration are run on a specific AWS EC2
instance. Note that this instance (p3.2xlarge) is not a bare metal
one, so performance may variate due to hypervisor controlling the
machine.
2022-12-07 21:32:01 +01:00
Quentin Bourgerie
11cef2086d chore(cuda): Add concrete-core as submodule in order to integrate concrete-cuda as a cmake subproject 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
90361f0b95 fix/chore: Remove custom gpu deleted target for tests 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
b9ea163704 test(bench/gpu): Activate loop parallelism for e2e benchmark of gpu 2022-12-07 21:32:01 +01:00
Quentin Bourgerie
792d46fa80 enhance(runtime/gpu): Cache keys copy to gpu 2022-12-07 21:32:01 +01:00
tmontaigu
f36e1fe882 feat(CAPI): use const ptrs to create tensor lambda arguments 2022-12-07 15:55:52 +01:00
tmontaigu
188642b153 chore(ci): add rustfmt check 2022-12-07 13:55:02 +01:00
rudy
f0457f74f2 fix: missing bench for 16bits tlu 2022-12-07 10:13:14 +01:00
youben11
7d785eebec feat(rust): support serialization 2022-12-05 17:17:53 +01:00
youben11
fbc60097ab refactor(rust): resolve artifacts' path and better stringRef mgmnt 2022-12-05 17:17:53 +01:00
youben11
ad988de9a3 feat(CAPI): add CompilationFeedback API 2022-12-05 17:17:53 +01:00
rudy
75dd26d0ab feat: bench do not keygen on all keys 2022-12-05 13:57:54 +01:00
Quentin Bourgerie
07c1e8347e refactor(tests): Refactor test tools to easiest run tests with description files and different compilation options 2022-12-05 13:57:54 +01:00
Quentin Bourgerie
1f45b9dfa5 fix(compiler): Do not rely on the input type on ConcreteToBConcrete conversion as it could be already rewritten by a previous pattern (close #809) 2022-12-03 04:19:37 +01:00
youben11
f05b1bd1ea feat(rust): support execution with tensor args 2022-12-02 14:03:02 +01:00
youben11
16f3b0bbf6 feat(rust): manage erros coming from compiler
C struct now contains an additonal char* pointer, which can be either
NULL in case there is no error, or a buffer containing the error
message. It's the responsability of destructor function to free that
memory.
2022-12-02 14:03:02 +01:00
youben11
15b4aac0a1 feat(rust): support keygen, encryption, execution 2022-12-02 14:03:02 +01:00
youben11
7f55385ea2 feat(rust): load server lambda for later execution 2022-12-02 14:03:02 +01:00
youben11
b00115f4ae feat(rust): compile mlir into library
CAPI covering a wider API of the Support library.
Better error handling. Could also be improved by returning an error
message back from C to rust (left TODO).
2022-12-02 14:03:02 +01:00
Quentin Bourgerie
0f88dd4bcb fix(ci): Fixing mac os ci 2022-11-30 11:17:48 +01:00
Quentin Bourgerie
50973a39bd refactor(compiler): Remove async offloading of BS/KS 2022-11-30 10:29:19 +01:00
Quentin Bourgerie
9e16f31b87 refactor(bconcrete): Separate bufferization and CAPI call generation 2022-11-30 10:29:19 +01:00
Quentin Bourgerie
fccb6da5b1 fix(check-tests): Just run llvm-lit in check_tests subdirectory 2022-11-30 10:29:19 +01:00
Quentin Bourgerie
3efa8eb2a9 refactor(tests): Use f-strings in linalg_apply_lookup_table generator 2022-11-30 10:02:07 +01:00
Quentin Bourgerie
6eb4cec706 fix(wopbs): Fixing woppbs with tensor operators (close #789)
- Missing offset in woppbs routine
- Better error message for check of tensor result in end to end fixture
- Modify fixture generator for testing purpose
2022-11-30 10:02:07 +01:00
Quentin Bourgerie
292cce04c3 enhance(clientlib): Use the parallel version for generating packing keys 2022-11-30 10:00:37 +01:00
rudy
ddb2b7fa58 fix(ci): more robust keysetcache download 2022-11-29 09:28:57 +01:00
Luis Montero
30be8cf4ae fix: fix MacOS test launching
* Update makefile to use appropriate arguments to find executables on
  macos systems.
* Add `set -e` to make sure that the tests crash if something goes wrong
  in the build or test of the macos job of the CI.

closes #783
2022-11-25 09:48:45 +01:00
Quentin Bourgerie
3bade6603a fix(compiler): Fix lowering of tensor.from_elements with crt 2022-11-24 16:30:37 +01:00
Quentin Bourgerie
5d89ad0f84 enhance(feedback): Add p_error and global_perror to the compiler feedback 2022-11-24 09:59:19 +01:00
Umut
722e4d2eba feat: give crt decomposition feedback 2022-11-24 09:59:19 +01:00
youben11
7f65f4f527 fix(ci): set env var to look for lib in build/lib
LD_LIBRARY_PATH is set to BUILD_DIR/lib during rust tests in order to
find the runtime lib which it depends on
2022-11-23 14:01:25 +01:00
youben11
96c958bd06 feat(rust): add compiler module with round_trip feature 2022-11-23 14:01:25 +01:00
youben11
5661b758d7 feat(CAPI): add initial API to do round-tripping with CompilerEngine 2022-11-23 14:01:25 +01:00
youben11
824aaaeff5 refactor(rust): separate generated CAPI under ffi module 2022-11-23 14:01:25 +01:00
youben11
c0d007e396 refactor: separate python bindings wrapper from CAPI
current CAPI of CompilerEngine isn't really a CAPI. It's initial need
was for the python bindings to have access to the CompilerEngine through
a convenient API. So we now make a clear separation of CAPI and python
wrappers. So we now have wrappers functions, that can be implemented
using C/C++, and will be exposed to python via pybind11. And we have a
CAPI (still need fixing as it still contains C++ code), that can be used
as is, or to build bindings for other languages (such as Rust).
2022-11-23 14:01:25 +01:00
rudy
c20b10194f fix: optimizer display, nan proba and 0 complexity
Resolves zama-ai/concrete-optimizer#201
Resolves zama-ai/concrete-optimizer#202
Resolves zama-ai/concrete-optimizer#204
2022-11-22 11:55:16 +01:00
Andi Drebes
fd362342f5 fix(compiler): Batching: Emit collapse/expand shape operations only for rank > 1
The batching pass passes operands to the batched operation as a flat,
one-dimensional vector produced through a `tensor.collapse_shape`
operation collapsing all dimensions of the original tensor of
operands. Similarly, the shape of the result vector of the batched
operation is expanded to the original shape afterwards using a
`tensor.expand_shape` operation.

The pass emits the `tensor.collapse_shape` and `tensor.expand_shape`
operations unconditionally, even for tensors, which already have only
a single dimension. This causes the verifiers of these operations to
fail in some cases, aborting the entire compilation process.

This patch lets the batching pass emit `tensor.collapse_shape` and
`tensor.expand_shape` for batched operands and batched results only if
the rank of the corresponding tensors is greater than one.
2022-11-21 14:53:43 +01:00
David Testé
3c2a75186f chore(ci): run ml benchmarks in a matrix with slab
This CI "feature" is meant to circumvent the 6 hours hard-limit
for a job in GitHub Action.
The benchmark is done using a matrix which is handled by Slab.
Here's the workflow:

  1. ML benchmarks are started in a fire and forget fashion via
     start_ml_benchmarks.yml
  2. Slab will read ci/slab.toml to get the AWS EC2 configuration
     and the matrix parameters
  3. Slab will launch at most max_parallel_jobs EC2 instances in
     parallel
  4. Each job will trigger ml_benchmark_subset.yml which will run
     only one of the generated YAML file via make generate-mlbench,
     based on the value of the matrix item they were given.
  5. As soon as a job is completed, the next one in the matrix
     will start promptly.

This is done until all the matrix items are exhausted.
2022-11-21 11:25:40 +01:00
Quentin Bourgerie
8e4be10eb9 chore(bench): Better number of ct for benchmarks 2022-11-21 11:18:23 +01:00
rudy
a8e2724b69 fix: use less error prone json parsing for CompilationFeedback
Both the error message and the type were wrong for complexity
2022-11-18 17:27:07 +01:00
Mayeul@Zama
0657767bae style(cmake): run format_cmake.sh 2022-11-18 15:15:41 +01:00
Mayeul@Zama
fa3556e8cc feat(CI): add cmake-format CI job 2022-11-18 15:15:41 +01:00