feat(compiler): add Dataflow/RT dialect and code generation for dataflow auto parallelization.

This commit is contained in:
Antoniu Pop
2021-12-20 12:20:33 +00:00
committed by Antoniu Pop
parent db683f4a0e
commit cdca7ca6f7
26 changed files with 1418 additions and 10 deletions

View File

@@ -84,6 +84,8 @@ void CompilerEngine::setVerifyDiagnostics(bool v) {
this->verifyDiagnostics = v;
}
void CompilerEngine::setAutoParallelize(bool v) { this->autoParallelize = v; }
void CompilerEngine::setGenerateClientParameters(bool v) {
this->generateClientParameters = v;
}
@@ -215,6 +217,13 @@ CompilerEngine::compile(llvm::SourceMgr &sm, Target target, OptionalLib lib) {
return errorDiag("Tiling of HLFHELinalg operations failed");
}
// Auto parallelization
if (this->autoParallelize &&
mlir::zamalang::pipeline::autopar(mlirContext, module, enablePass)
.failed()) {
return StreamStringError("Auto parallelization failed");
}
if (target == Target::HLFHE)
return std::move(res);