HEP-FCC / FCCAnalyses

Common analysis framework for the Future Circular Collider
https://hep-fcc.github.io/FCCAnalyses/
22 stars 112 forks source link

Add support for compiling with newer ONNXRuntime #373

Closed jmcarcell closed 4 months ago

jmcarcell commented 4 months ago

At least version 1.17.1 (this is the most recent one in spack) provides onnxruntimeConfig.cmake and uses the name "onnxruntime" all lower case. This PR should make it possible to build with 1.17.1 (waiting for confirmation if the stack builds) and with the current ONNXRuntime version (CI seems to confirm this)

Related to this, it seems newer versions of ONNXRuntime don't install the headers that are being used by FCCAnalyses (everything under include/onnxruntime/core doesn't get installed except common): https://github.com/HEP-FCC/FCCAnalyses/blob/994d52c51aba675dc9ff0c0653383a864ef9b5f3/addons/ONNXRuntime/src/ONNXRuntime.cc#L3 This seems to have changed from the version that was installed last time, which was 1.10.0. In that one, I can see the whole core folder being installed. For now I'm patching ONNXRuntime but I didn't even find an option in ONNXRuntime to install these. Are these intended to be used then?

See also https://github.com/key4hep/key4hep-spack/issues/578