fix(compiler): Custom copy op from 1D tensor to avoir stack allocation from mlir memref to llvm lowering

This commit is contained in:
Quentin Bourgerie
2022-04-07 23:49:30 +02:00
parent af300055a7
commit 247d60503d
9 changed files with 137 additions and 29 deletions

View File

@@ -0,0 +1,11 @@
// Part of the Concrete Compiler Project, under the BSD3 License with Zama
// Exceptions. See
// https://github.com/zama-ai/concrete-compiler-internal/blob/master/LICENSE.txt
// for license information.
#include "mlir/IR/PatternMatch.h"
mlir::LogicalResult insertForwardDeclaration(mlir::Operation *op,
mlir::RewriterBase &rewriter,
llvm::StringRef funcName,
mlir::FunctionType funcType);

View File

@@ -57,6 +57,12 @@ void memref_bootstrap_lwe_u64(
uint64_t ct0_stride, uint64_t *glwe_ct_allocated, uint64_t *glwe_ct_aligned,
uint64_t glwe_ct_offset, uint64_t glwe_ct_size, uint64_t glwe_ct_stride,
mlir::concretelang::RuntimeContext *context);
void memref_copy_one_rank(uint64_t *src_allocated, uint64_t *src_aligned,
uint64_t src_offset, uint64_t src_size,
uint64_t src_stride, uint64_t *dst_allocated,
uint64_t *dst_aligned, uint64_t dst_offset,
uint64_t dst_size, uint64_t dst_stride);
}
#endif