onnx-mlir icon indicating copy to clipboard operation
onnx-mlir copied to clipboard

OpenMP in the support libraries

Open AlexandreEichenberger opened this issue 1 year ago • 1 comments

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).

  1. Use the llvm-project we already build for the 'mlir' support, and add 'clang' and 'OpenMP' to it.
  2. 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.

AlexandreEichenberger avatar Feb 06 '24 19:02 AlexandreEichenberger