diff --git a/include/api/model.h b/include/api/model.h index 53dfdb0d51d..3b07d11c1ff 100644 --- a/include/api/model.h +++ b/include/api/model.h @@ -74,6 +74,13 @@ class MS_API Model { Status Predict(const std::vector &inputs, std::vector *outputs, const MSKernelCallBack &before = nullptr, const MSKernelCallBack &after = nullptr); + /// \brief Load config file. + /// + /// \param[in] config_path config file path. + /// + /// \return Status. + Status LoadConfig(const std::string &config_path); + /// \brief Obtains all input tensors of the model. /// /// \return The vector that includes all input tensors. diff --git a/include/api/status.h b/include/api/status.h index a40f7411088..ef91a900571 100644 --- a/include/api/status.h +++ b/include/api/status.h @@ -70,15 +70,16 @@ enum StatusCode : uint32_t { kMCInvalidArgs = kMC | 0x4, // Lite // Common error code, range: [-1, -100) - kLiteError = kLite | (0x0FFFFFFF & -1), /**< Common error code. */ - kLiteNullptr = kLite | (0x0FFFFFFF & -2), /**< NULL pointer returned.*/ - kLiteParamInvalid = kLite | (0x0FFFFFFF & -3), /**< Invalid parameter.*/ - kLiteNoChange = kLite | (0x0FFFFFFF & -4), /**< No change. */ - kLiteSuccessExit = kLite | (0x0FFFFFFF & -5), /**< No error but exit. */ - kLiteMemoryFailed = kLite | (0x0FFFFFFF & -6), /**< Fail to create memory. */ - kLiteNotSupport = kLite | (0x0FFFFFFF & -7), /**< Fail to support. */ - kLiteThreadPoolError = kLite | (0x0FFFFFFF & -8), /**< Error occur in thread pool. */ + kLiteError = kLite | (0x0FFFFFFF & -1), /**< Common error code. */ + kLiteNullptr = kLite | (0x0FFFFFFF & -2), /**< NULL pointer returned.*/ + kLiteParamInvalid = kLite | (0x0FFFFFFF & -3), /**< Invalid parameter.*/ + kLiteNoChange = kLite | (0x0FFFFFFF & -4), /**< No change. */ + kLiteSuccessExit = kLite | (0x0FFFFFFF & -5), /**< No error but exit. */ + kLiteMemoryFailed = kLite | (0x0FFFFFFF & -6), /**< Fail to create memory. */ + kLiteNotSupport = kLite | (0x0FFFFFFF & -7), /**< Fail to support. */ + kLiteThreadPoolError = kLite | (0x0FFFFFFF & -8), /**< Error occur in thread pool. */ kLiteUninitializedObj = kLite | (0x0FFFFFFF & -9), /**< Object is not initialized. */ + kLiteFileError = kLite | (0x0FFFFFFF & -10), /**< Invalid file. */ // Executor error code, range: [-100,-200) kLiteOutOfTensorRange = kLite | (0x0FFFFFFF & -100), /**< Failed to check range. */