46 OrtModel(std::unordered_map<std::string, std::string> optionsMap);
47 void init(std::unordered_map<std::string, std::string> optionsMap);
51 void initOptions(std::unordered_map<std::string, std::string> optionsMap);
75 if (mDeviceType ==
"CPU") {
76 mIntraOpNumThreads = threads;
81 if (mDeviceType ==
"CPU") {
82 mInterOpNumThreads = threads;
88 template <
class I,
class O>
89 std::vector<O>
v2v(std::vector<I>&,
bool =
true);
92 template <
class I,
class O>
93 std::vector<O>
inference(std::vector<I>&);
95 template <
class I,
class O>
96 std::vector<O>
inference(std::vector<std::vector<I>>&);
98 template <
class I,
class O>
101 template <
class I,
class O>
109 std::unique_ptr<OrtVariables> mPImplOrt;
112 std::vector<const char*> mInputNamesChar, mOutputNamesChar;
113 std::vector<std::string> mInputNames, mOutputNames;
114 std::vector<std::vector<int64_t>> mInputShapes, mOutputShapes, mInputShapesCopy, mOutputShapesCopy;
115 std::vector<int64_t> mInputSizePerNode, mOutputSizePerNode;
116 int32_t mInputsTotal = 0, mOutputsTotal = 0;
119 bool mInitialized =
false;
120 std::string mModelPath, mEnvName =
"", mDeviceType =
"CPU", mThreadAffinity =
"";
121 int32_t mIntraOpNumThreads = 1, mInterOpNumThreads = 1, mDeviceId = -1, mEnableProfiling = 0, mLoggingLevel = 0, mAllocateDeviceMemory = 0, mEnableOptimizations = 0;
123 std::string printShape(
const std::vector<int64_t>&);
124 std::string printShape(
const std::vector<std::vector<int64_t>>&, std::vector<std::string>&);