Skip to content

Commit

Permalink
Merge branch 'main' into ferdinand.update_llvm_october_2024
Browse files Browse the repository at this point in the history
  • Loading branch information
hamptonm1 authored Oct 2, 2024
2 parents b1a4dc1 + ccf9552 commit 35486f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Compiler/CompilerOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,13 @@ void initCompilerConfig() {
addCompilerConfig(CCM_SHARED_LIB_DEPS, extraLibs);
addCompilerConfig(CCM_SHARED_LIB_PATH_DEPS, extraLibPaths);
}

// Enable aggressive optimization for NNPA with -O3
if (OptimizationLevel == OptLevel::O3 &&
getTargetAccel().find("NNPA") != std::string::npos &&
getLLVMOption().find("enable-unsafe-fp-math") == std::string::npos) {
setLLVMOption(getLLVMOption() + " --enable-unsafe-fp-math");
}
}

} // namespace onnx_mlir

0 comments on commit 35486f3

Please sign in to comment.