mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 12:15:09 -05:00
feat: support parallelization in python
This commit is contained in:
@@ -15,13 +15,19 @@ using mlir::concretelang::JitCompilerEngine;
|
||||
|
||||
mlir::concretelang::JitCompilerEngine::Lambda
|
||||
buildLambda(const char *module, const char *funcName,
|
||||
const char *runtimeLibPath, const char *keySetCachePath) {
|
||||
const char *runtimeLibPath, const char *keySetCachePath,
|
||||
bool autoParallelize, bool loopParallelize, bool dfParallelize) {
|
||||
// Set the runtime library path if not nullptr
|
||||
llvm::Optional<llvm::StringRef> runtimeLibPathOptional = {};
|
||||
if (runtimeLibPath != nullptr)
|
||||
runtimeLibPathOptional = runtimeLibPath;
|
||||
mlir::concretelang::JitCompilerEngine engine;
|
||||
|
||||
// Set parallelization flags
|
||||
engine.setAutoParallelize(autoParallelize);
|
||||
engine.setLoopParallelize(loopParallelize);
|
||||
engine.setDataflowParallelize(dfParallelize);
|
||||
|
||||
using KeySetCache = mlir::concretelang::KeySetCache;
|
||||
using optKeySetCache = llvm::Optional<mlir::concretelang::KeySetCache>;
|
||||
auto cacheOpt = optKeySetCache();
|
||||
|
||||
Reference in New Issue
Block a user