mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 20:25:34 -05:00
feat(compiler): Add pass converting operations into SDFG processes
This adds a new pass `ExtractSDGOps`, which scans a function for operations that implement `SDFGConvertibleOpInterface`, replaces them with SDFG processes and constructs an SDFG graph around the processes. Initialization and teardown of the SDFG graph are embedded into the function and take place at the beginning of the function and before the function's terminator, respectively. The pass can be invoked using concretecompiler by specifying the new compilation option `--emit-sdfg-ops` or programmatically on a `CompilerEngine` using the new compilation option `extractSDFGOps`.
This commit is contained in:
@@ -173,6 +173,13 @@ llvm::cl::opt<bool> batchConcreteOps(
|
||||
"operations out of loop nests as batched operations"),
|
||||
llvm::cl::init(false));
|
||||
|
||||
llvm::cl::opt<bool> emitSDFGOps(
|
||||
"emit-sdfg-ops",
|
||||
llvm::cl::desc(
|
||||
"Extract operations supported by the SDFG dialect for static data flow"
|
||||
" graphs and emit them."),
|
||||
llvm::cl::init(false));
|
||||
|
||||
llvm::cl::opt<bool> dataflowParallelize(
|
||||
"parallelize-dataflow",
|
||||
llvm::cl::desc(
|
||||
@@ -305,6 +312,7 @@ cmdlineCompilationOptions() {
|
||||
options.loopParallelize = cmdline::loopParallelize;
|
||||
options.dataflowParallelize = cmdline::dataflowParallelize;
|
||||
options.batchConcreteOps = cmdline::batchConcreteOps;
|
||||
options.emitSDFGOps = cmdline::emitSDFGOps;
|
||||
options.optimizeConcrete = cmdline::optimizeConcrete;
|
||||
options.emitGPUOps = cmdline::emitGPUOps;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user