ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthOnnx
AthOnnxInterfaces
AthOnnxInterfaces
IAthInferenceTool.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
#ifndef AthInfer_IAthInferenceTool_H
3
#define AthInfer_IAthInferenceTool_H
4
5
#include "
AsgTools/IAsgTool.h
"
6
7
#include <vector>
8
#include <string>
9
#include <variant>
10
#include <map>
11
#include <cstdint>
12
13
namespace
AthInfer
{
14
15
using
DataVariant
= std::variant<std::vector<float>, std::vector<int64_t>, std::vector<uint8_t> >;
16
using
InferenceData
= std::pair<std::vector<int64_t>,
DataVariant
>;
17
using
InputDataMap
= std::map<std::string, InferenceData>;
18
using
OutputDataMap
= std::map<std::string, InferenceData>;
19
20
// class asg::IAsgTool
21
// Interface class for running inferences in Athena.
22
// @author Xiangyang Ju <xju@cern.ch>
23
24
class
IAthInferenceTool
:
virtual
public
asg::IAsgTool
25
{
26
ASG_TOOL_INTERFACE
(
IAthInferenceTool
)
27
public
:
28
29
// Run inference with multiple inputs and multiple outputs
30
virtual
StatusCode
inference
(
InputDataMap
& inputData,
OutputDataMap
& outputData)
const
= 0;
31
};
32
}
33
34
#endif
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition
AsgToolMacros.h:40
IAsgTool.h
AthInfer::IAthInferenceTool
Definition
IAthInferenceTool.h:25
AthInfer::IAthInferenceTool::inference
virtual StatusCode inference(InputDataMap &inputData, OutputDataMap &outputData) const =0
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition
IAsgTool.h:41
AthInfer
Definition
ExampleAsyncMLInferenceWithTriton.cxx:17
AthInfer::OutputDataMap
std::map< std::string, InferenceData > OutputDataMap
Definition
IAthInferenceTool.h:18
AthInfer::DataVariant
std::variant< std::vector< float >, std::vector< int64_t >, std::vector< uint8_t > > DataVariant
Definition
IAthInferenceTool.h:15
AthInfer::InputDataMap
std::map< std::string, InferenceData > InputDataMap
Definition
IAthInferenceTool.h:17
AthInfer::InferenceData
std::pair< std::vector< int64_t >, DataVariant > InferenceData
Definition
IAthInferenceTool.h:16
Generated on
for ATLAS Offline Software by
1.17.0