ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthOnnx
AthOnnxComps
AthOnnxComps
OnnxRuntimeSvc.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
#ifndef ATHONNX_ONNXRUNTIMESVC_H
4
#define ATHONNX_ONNXRUNTIMESVC_H
5
6
// Local include(s).
7
#include "
AthOnnxInterfaces/IOnnxRuntimeSvc.h
"
8
9
// Framework include(s).
10
#include <
AsgServices/AsgService.h
>
11
#include "
AsgTools/PropertyWrapper.h
"
12
13
// ONNX include(s).
14
#include <onnxruntime_cxx_api.h>
15
16
// System include(s).
17
#include <memory>
18
19
namespace
AthOnnx
{
20
28
class
OnnxRuntimeSvc
:
public
extends<asg::AsgService, IOnnxRuntimeSvc> {
29
30
public
:
31
34
OnnxRuntimeSvc
(
const
std::string& name, ISvcLocator* svc);
35
37
virtual
StatusCode
initialize
()
override
;
39
virtual
StatusCode
finalize
()
override
;
40
42
45
47
virtual
Ort::Env&
env
()
const override
;
48
50
51
private
:
53
Gaudi::Property<int>
m_logLevel
{
this
,
"LogLevel"
, 2,
"ONNX Runtime logging level (0=VERBOSE, 1=INFO, 2=WARNING, 3=ERROR, 4=FATAL)"
};
54
56
std::unique_ptr< Ort::Env >
m_env
;
57
58
};
// class OnnxRuntimeSvc
59
60
}
// namespace AthOnnx
61
62
#endif
// ATHONNX_ONNXRUNTIMESVC_H
AsgService.h
IOnnxRuntimeSvc.h
PropertyWrapper.h
AthOnnx::OnnxRuntimeSvc::m_logLevel
Gaudi::Property< int > m_logLevel
ONNX Runtime logging level (0=VERBOSE, 1=INFO, 2=WARNING, 3=ERROR, 4=FATAL).
Definition
OnnxRuntimeSvc.h:53
AthOnnx::OnnxRuntimeSvc::m_env
std::unique_ptr< Ort::Env > m_env
Global runtime environment for Onnx Runtime.
Definition
OnnxRuntimeSvc.h:56
AthOnnx::OnnxRuntimeSvc::env
virtual Ort::Env & env() const override
Return the Onnx Runtime environment object.
Definition
OnnxRuntimeSvc.cxx:38
AthOnnx::OnnxRuntimeSvc::finalize
virtual StatusCode finalize() override
Function finalising the service.
Definition
OnnxRuntimeSvc.cxx:28
AthOnnx::OnnxRuntimeSvc::initialize
virtual StatusCode initialize() override
Function initialising the service.
Definition
OnnxRuntimeSvc.cxx:13
AthOnnx::OnnxRuntimeSvc::OnnxRuntimeSvc
OnnxRuntimeSvc(const std::string &name, ISvcLocator *svc)
Definition
OnnxRuntimeSvc.cxx:8
AthOnnx
Namespace holding all of the Onnx Runtime example code.
Definition
EvaluateModel.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0