1 #ifndef HeterogeneousCore_SonicTriton_triton_utils
2 #define HeterogeneousCore_SonicTriton_triton_utils
10 #include <unordered_set>
12 #include "grpc_client.h"
14 namespace triton_utils {
18 template <
typename DT>
29 inline bool triton_utils::checkType<char>(inference::DataType dtype) {
30 return dtype == inference::DataType::TYPE_BOOL
or dtype == inference::DataType::TYPE_STRING;
33 inline bool triton_utils::checkType<uint8_t>(inference::DataType dtype) {
34 return dtype == inference::DataType::TYPE_UINT8;
37 inline bool triton_utils::checkType<uint16_t>(inference::DataType dtype) {
38 return dtype == inference::DataType::TYPE_UINT16
or dtype == inference::DataType::TYPE_FP16;
41 inline bool triton_utils::checkType<uint32_t>(inference::DataType dtype) {
42 return dtype == inference::DataType::TYPE_UINT32;
45 inline bool triton_utils::checkType<uint64_t>(inference::DataType dtype) {
46 return dtype == inference::DataType::TYPE_UINT64;
49 inline bool triton_utils::checkType<int8_t>(inference::DataType dtype) {
50 return dtype == inference::DataType::TYPE_INT8;
53 inline bool triton_utils::checkType<int16_t>(inference::DataType dtype) {
54 return dtype == inference::DataType::TYPE_INT16;
57 inline bool triton_utils::checkType<int32_t>(inference::DataType dtype) {
58 return dtype == inference::DataType::TYPE_INT32;
61 inline bool triton_utils::checkType<int64_t>(inference::DataType dtype) {
62 return dtype == inference::DataType::TYPE_INT64;
65 inline bool triton_utils::checkType<float>(inference::DataType dtype) {
66 return dtype == inference::DataType::TYPE_FP32;
69 inline bool triton_utils::checkType<double>(inference::DataType dtype) {
70 return dtype == inference::DataType::TYPE_FP64;
75 #define TRITON_THROW_IF_ERROR(X, MSG) \
77 triton::client::Error err = (X); \
79 throw TritonException("TritonFailure") << (MSG) << (err.Message().empty() ? "" : ": " + err.Message()); \
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
bool checkType(inference::DataType dtype)
std::string printColl(const C &coll, const std::string &delim=", ")