|
| StatusCode | getClient (tc::InferenceServerGrpcClient *&client, const std::string &url, int port, bool useSSL) const |
| template<typename T> |
| StatusCode | prepareInput (const std::string &name, const std::vector< int64_t > &shape, const std::vector< T > &data, std::vector< std::unique_ptr< tc::InferInput > > &inputs) const |
| template<typename T> |
| StatusCode | extractOutput (const std::string &name, const tc::InferResult &result, std::vector< T > &outputVec) const |
| | AthMessaging (IMessageSvc *msgSvc, const std::string &name) |
| | Constructor.
|
| | AthMessaging (const std::string &name) |
| | Constructor with auto-retrieval of the MessageSvc.
|
| bool | msgLvl (const MSG::Level lvl) const |
| | Test the output level.
|
| MsgStream & | msg () const |
| | The standard message stream.
|
| MsgStream & | msg (const MSG::Level lvl) const |
| | The standard message stream.
|
| void | setLevel (MSG::Level lvl) |
| | Change the current logging level.
|
|
| std::unique_ptr< tc::InferOptions > | m_options |
|
| std::string | m_nm |
| | Message source name.
|
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| | MsgStream instance (a std::cout like with print-out levels).
|
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| | MessageSvc pointer.
|
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| | Current logging level.
|
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| | Messaging initialized (initMessaging).
|
Definition at line 46 of file TritonTool.cxx.
◆ AthMessaging() [1/2]
Constructor with auto-retrieval of the MessageSvc.
- Parameters
-
| name | Name of the message stream |
Definition at line 71 of file AthMessaging.cxx.
19 :
21{}
std::string m_nm
Message source name.
◆ AthMessaging() [2/2]
Constructor.
- Parameters
-
| msgSvc | Pointer to the MessageSvc |
| name | Name of the message stream |
Definition at line 66 of file AthMessaging.cxx.
14 :
16{}
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
◆ extractOutput()
template<typename T>
| StatusCode AthInfer::TritonTool::Impl::extractOutput |
( |
const std::string & | name, |
|
|
const tc::InferResult & | result, |
|
|
std::vector< T > & | outputVec ) const |
|
inline |
Definition at line 100 of file TritonTool.cxx.
102 {
103
104 const uint8_t* rawData =
nullptr;
106
107
108
109
111
112 outputVec.resize(
size /
sizeof(T));
113 std::memcpy(outputVec.data(), rawData,
size);
114 return StatusCode::SUCCESS;
115 }
size_t size() const
Number of registered mappings.
◆ getClient()
| StatusCode AthInfer::TritonTool::Impl::getClient |
( |
tc::InferenceServerGrpcClient *& | client, |
|
|
const std::string & | url, |
|
|
int | port, |
|
|
bool | useSSL ) const |
|
inline |
Definition at line 51 of file TritonTool.cxx.
52 {
53
54 thread_local std::unique_ptr<tc::InferenceServerGrpcClient> threadClient;
55 if (!threadClient) {
56
57 const std::string urlAndPort =
58 url +
":" + std::to_string(port);
59
62 &threadClient, urlAndPort,
verbose, useSSL));
63
64 ATH_MSG_INFO(
"Triton client created for url: " << urlAndPort);
65 }
66 client = threadClient.get();
67
68 return StatusCode::SUCCESS;
69 }
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
40{
42
43 if (
m_lvl == MSG::NIL) {
47 }
48}
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ msg() [1/2]
| MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 167 of file AthMessaging.h.
168{
170 if (!ms) {
174 }
175
178}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels).
void initMessaging() const
Initialize our message level and MessageSvc.
◆ msg() [2/2]
| MsgStream & AthMessaging::msg |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 182 of file AthMessaging.h.
183{
return msg() << lvl; }
MsgStream & msg() const
The standard message stream.
◆ msgLvl()
| bool AthMessaging::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
152{
153
154
156
159 return true;
160 } else {
161 return false;
162 }
163}
◆ prepareInput()
template<typename T>
| StatusCode AthInfer::TritonTool::Impl::prepareInput |
( |
const std::string & | name, |
|
|
const std::vector< int64_t > & | shape, |
|
|
const std::vector< T > & | data, |
|
|
std::vector< std::unique_ptr< tc::InferInput > > & | inputs ) const |
|
inline |
Definition at line 72 of file TritonTool.cxx.
75 {
76
77 const char*
dtype = TritonDType<T>::value;
78 tc::InferInput* rawInputPtr = nullptr;
79
80
81
82 TRITON_CHECK(tc::InferInput::Create(&rawInputPtr, name, shape, dtype));
83 assert(rawInputPtr != nullptr);
84
85
86
87
88
89
90
91 std::unique_ptr<tc::InferInput>
input{rawInputPtr};
93 data.size() *
sizeof(T)));
94
95 inputs.push_back(std::move(input));
96 return StatusCode::SUCCESS;
97 }
char data[hepevt_bytes_allocation_ATLAS]
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels).
Definition at line 132 of file AthMessaging.h.
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_options
| std::unique_ptr<tc::InferOptions> AthInfer::TritonTool::Impl::m_options |
The documentation for this struct was generated from the following file: