HEP-FCC / FCCAnalyses

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

Make ONNXRuntime work with older and newer versions of onnxruntime #381

Closed tmadlener closed 2 months ago

tmadlener commented 2 months ago

The current implementation does not compile with onnxruntime@1.17.1. It works in CI, because it picks up v1.10.0 there. This PR should make this work with older and newer versions of the library. The most notable changes are

The last bit required the introduction of an Ort::MemoryInfo that is necessary to create tensors. This now creates the tensors on the CPU, I am not sure if that is going to be an issue or not for running things on GPU. Is running on GPU something that is currently done?

tmadlener commented 2 months ago

@jmcarcell this should make this cherry-pick obsolete: https://github.com/key4hep/key4hep-spack/blob/dc0b2bc4aaad8f3ef5f3c7f62ff5b0277a554eee/.cherry-pick#L37

(Also that threw me for quite some loop ;) )

kjvbrt commented 2 months ago

Thanks @tmadlener :)