49 OrtModel(std::unordered_map<std::string, std::string> optionsMap);
50 void init(std::unordered_map<std::string, std::string> optionsMap);
54 void initOptions(std::unordered_map<std::string, std::string> optionsMap);
78 if (mDeviceType ==
"CPU") {
79 mIntraOpNumThreads = threads;
84 if (mDeviceType ==
"CPU") {
85 mInterOpNumThreads = threads;
91 template <
class I,
class O>
92 std::vector<O>
v2v(std::vector<I>&,
bool =
true);
95 template <
class I,
class O>
96 std::vector<O>
inference(std::vector<I>&);
98 template <
class I,
class O>
99 std::vector<O>
inference(std::vector<std::vector<I>>&);
101 template <
class I,
class O>
104 template <
class I,
class O>
112 std::unique_ptr<OrtVariables> mPImplOrt;
115 std::vector<const char*> mInputNamesChar, mOutputNamesChar;
116 std::vector<std::string> mInputNames, mOutputNames;
117 std::vector<std::vector<int64_t>> mInputShapes, mOutputShapes, mInputShapesCopy, mOutputShapesCopy;
118 std::vector<int64_t> mInputSizePerNode, mOutputSizePerNode;
119 int32_t mInputsTotal = 0, mOutputsTotal = 0;
122 bool mInitialized =
false;
123 std::string mModelPath, mEnvName =
"", mDeviceType =
"CPU", mThreadAffinity =
"";
124 int32_t mIntraOpNumThreads = 1, mInterOpNumThreads = 1, mDeviceId = -1, mEnableProfiling = 0, mLoggingLevel = 0, mAllocateDeviceMemory = 0, mEnableOptimizations = 0;
126 std::string printShape(
const std::vector<int64_t>&);
127 std::string printShape(
const std::vector<std::vector<int64_t>>&, std::vector<std::string>&);