ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExTriton
src
ExampleMLInferenceWithTriton.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3
#ifndef ATHEXTRITON_EXAMPLEMLINFERENCEWITHTRITON_H
4
#define ATHEXTRITON_EXAMPLEMLINFERENCEWITHTRITON_H
5
6
// Framework include(s).
7
#include "
AthOnnxInterfaces/IAthInferenceTool.h
"
8
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
9
10
// System include(s).
11
#include <string>
12
#include <vector>
13
14
namespace
AthInfer
{
15
21
class
ExampleMLInferenceWithTriton
:
public
AthReentrantAlgorithm
{
22
23
public
:
25
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
26
29
31
virtual
StatusCode
initialize
()
override
;
33
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
34
36
37
private
:
40
42
Gaudi::Property<std::string>
m_pixelFileName
{
43
this
,
"InputDataPixel"
,
"dev/MLTest/2020-03-31/t10k-images-idx3-ubyte"
,
44
"Name of the input pixel file to load"
};
45
48
Gaudi::Property<int>
m_batchSize
{
this
,
"BatchSize"
, 1,
49
"No. of elements/example in a batch"
};
50
52
ToolHandle<AthInfer::IAthInferenceTool>
m_tritonTool
{
53
this
,
"InferenceTool"
,
"AthInfer::TritonTool"
,
"Triton client tool"
};
54
55
std::vector<std::vector<std::vector<float>>>
m_input_tensor_values_notFlat
;
56
};
57
58
}
// namespace AthInfer
59
#endif
// ATHEXTRITON_EXAMPLEMLINFERENCEWITHTRITON_H
AthReentrantAlgorithm.h
IAthInferenceTool.h
AthInfer::ExampleMLInferenceWithTriton
Algorithm demonstrating the usage of the Triton Client API.
Definition
ExampleMLInferenceWithTriton.h:21
AthInfer::ExampleMLInferenceWithTriton::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm for a single event.
Definition
ExampleMLInferenceWithTriton.cxx:65
AthInfer::ExampleMLInferenceWithTriton::initialize
virtual StatusCode initialize() override
Function initialising the algorithm.
Definition
ExampleMLInferenceWithTriton.cxx:19
AthInfer::ExampleMLInferenceWithTriton::m_batchSize
Gaudi::Property< int > m_batchSize
Following properties needed to be consdered if the .onnx model is evaluated in batch mode.
Definition
ExampleMLInferenceWithTriton.h:48
AthInfer::ExampleMLInferenceWithTriton::m_input_tensor_values_notFlat
std::vector< std::vector< std::vector< float > > > m_input_tensor_values_notFlat
Definition
ExampleMLInferenceWithTriton.h:55
AthInfer::ExampleMLInferenceWithTriton::m_tritonTool
ToolHandle< AthInfer::IAthInferenceTool > m_tritonTool
Tool handle for the Triton client.
Definition
ExampleMLInferenceWithTriton.h:52
AthInfer::ExampleMLInferenceWithTriton::m_pixelFileName
Gaudi::Property< std::string > m_pixelFileName
Name of the model file to load.
Definition
ExampleMLInferenceWithTriton.h:42
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
AthInfer
Definition
ExampleAsyncMLInferenceWithTriton.cxx:17
Generated on
for ATLAS Offline Software by
1.17.0