onnx-mlir
onnx-mlir copied to clipboard
OpenMP in the support libraries
We are interested in generating multiple threading code in the extension library, which we compile when targeting the NNPA accelerator. This runtime is loaded into the .so model, and is compiled when we build onnx-mlir (like the cruntime
, for example).
If we introduce parallelism while building onnx-mlir, it is key that we use the llvm compiler with an OpenMP enabled. There would be generally two options that I can think of (maybe there are others).
- Use the llvm-project we already build for the 'mlir' support, and add 'clang' and 'OpenMP' to it.
- Use a locally build llvm with OpenMP (maybe there is a way to download it easily in our docker,...
Parallel is not enabled by default yet, we would like to extend its usage from currently only in the generated model to also some of the underlying support libraries that are bundled with the .so model.