HeterogeneousCore
SonicTriton
interface
triton_utils.h
Go to the documentation of this file.
1
#ifndef HeterogeneousCore_SonicTriton_triton_utils
2
#define HeterogeneousCore_SonicTriton_triton_utils
3
4
#include "
FWCore/Utilities/interface/Span.h
"
5
6
#include <string>
7
#include <string_view>
8
#include <vector>
9
#include <unordered_set>
10
11
#include "grpc_client.h"
12
13
namespace
triton_utils
{
14
15
using
Error
=
nvidia::inferenceserver::client::Error
;
16
17
template
<
typename
C>
18
std::string
printColl
(
const
C
& coll,
const
std::string
& delim =
", "
);
19
20
//helper to turn triton error into exception
21
void
throwIfError
(
const
Error
&
err
, std::string_view
msg
);
22
23
//helper to turn triton error into warning
24
bool
warnIfError
(
const
Error
&
err
, std::string_view
msg
);
25
26
}
// namespace triton_utils
27
28
extern
template
std::string
triton_utils::printColl
(
const
edm::Span
<std::vector<int64_t>::const_iterator>& coll,
29
const
std::string
& delim);
30
extern
template
std::string
triton_utils::printColl
(
const
std::vector<uint8_t>& coll,
const
std::string
& delim);
31
extern
template
std::string
triton_utils::printColl
(
const
std::vector<float>& coll,
const
std::string
& delim);
32
extern
template
std::string
triton_utils::printColl
(
const
std::unordered_set<std::string>& coll,
33
const
std::string
& delim);
34
35
#endif
mps_check.msg
tuple msg
Definition:
mps_check.py:285
triton_utils::warnIfError
bool warnIfError(const Error &err, std::string_view msg)
Definition:
triton_utils.cc:25
triton_utils::Error
nvidia::inferenceserver::client::Error Error
Definition:
triton_utils.h:15
triton_utils::throwIfError
void throwIfError(const Error &err, std::string_view msg)
Definition:
triton_utils.cc:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
Span.h
submitPVResolutionJobs.err
err
Definition:
submitPVResolutionJobs.py:85
gen::C
C
Definition:
PomwigHadronizer.cc:78
triton_utils
Definition:
triton_utils.h:13
edm::Span
Definition:
Span.h:16
triton_utils::printColl
std::string printColl(const C &coll, const std::string &delim=", ")
Definition:
triton_utils.cc:11
Generated for CMSSW Reference Manual by
1.8.16