File OnnxRuntimeBase.hpp

namespace Acts


This file is foreseen for the Geometry module to replace Extent

class OnnxRuntimeBase
#include </home/docs/checkouts/>

Subclassed by Acts::MLTrackClassifier

Public Functions

OnnxRuntimeBase() = default

Default constructor.

OnnxRuntimeBase(Ort::Env &env, const char *modelPath)

Parametrized constructor.

  • env – the ONNX runtime environment

  • modelPath – the path to the ML model in *.onnx format

~OnnxRuntimeBase() = default

Default destructor.

Protected Functions

std::vector<float> runONNXInference(std::vector<float> &inputTensorValues) const

Run the ONNX inference function.


inputTensorValues – The input feature values used for prediction


The output (predicted) values

Private Members

std::vector<int64_t> m_inputNodeDims
std::vector<const char*> m_inputNodeNames
std::vector<int64_t> m_outputNodeDims
std::vector<const char*> m_outputNodeNames
std::unique_ptr<Ort::Session> m_session

ONNX runtime session / model properties.