ATLAS Offline Software
Loading...
Searching...
No Matches
NNSharingOnnxSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef NN_SHARING_ONNX_SVC_H
6#define NN_SHARING_ONNX_SVC_H
7
11
12namespace FlavorTagInference
13{
14 class NNSharingOnnxSvc: public extends<asg::AsgService, INNSharingSvc>
15 {
16 public:
17 using extends::extends; // base class constructor
18 virtual std::shared_ptr<const GNN> get(
19 const std::string& nn_name,
20 const GNNOptions& opts) override;
21 private:
22 using val_t = std::shared_ptr<const GNN>;
23 std::unordered_map<NNHashing::NNKey, val_t, NNHashing::NNHasher> m_gnns;
24 std::unordered_map<std::string, val_t> m_base_gnns;
25 Gaudi::Property<std::string> m_executionProvider {
26 this, "executionProvider", "CPU",
27 "onnx execution provider to build the sessions on, CPU or CUDA"};
28 Gaudi::Property<int> m_deviceId {
29 this, "deviceId", 0, "device the CUDA provider runs on"};
30 Gaudi::Property<bool> m_useTF32 {
31 this, "useTF32", false,
32 "let tensor cores evaluate fp32 matmuls in TF32"};
33 };
34
35}
36
37#endif
std::unordered_map< NNHashing::NNKey, val_t, NNHashing::NNHasher > m_gnns
Gaudi::Property< std::string > m_executionProvider
std::unordered_map< std::string, val_t > m_base_gnns
virtual std::shared_ptr< const GNN > get(const std::string &nn_name, const GNNOptions &opts) override
std::shared_ptr< const GNN > val_t
This file contains "getter" functions used for accessing tagger inputs from the EDM.