ONNX Runtime
|
Class that represents session configuration entries for one or more custom operators. More...
#include <onnxruntime_cxx_api.h>
Public Member Functions | |
CustomOpConfigs ()=default | |
~CustomOpConfigs ()=default | |
CustomOpConfigs (const CustomOpConfigs &)=default | |
CustomOpConfigs & | operator= (const CustomOpConfigs &)=default |
CustomOpConfigs (CustomOpConfigs &&o)=default | |
CustomOpConfigs & | operator= (CustomOpConfigs &&o)=default |
CustomOpConfigs & | AddConfig (const char *custom_op_name, const char *config_key, const char *config_value) |
Adds a session configuration entry/value for a specific custom operator. | |
const std::unordered_map< std::string, std::string > & | GetFlattenedConfigs () const |
Returns a flattened map of custom operator configuration entries and their values. | |
Class that represents session configuration entries for one or more custom operators.
Example: Ort::CustomOpConfigs op_configs; op_configs.AddConfig("my_custom_op", "device_type", "CPU");
Passed to Ort::SessionOptions::RegisterCustomOpsLibrary.
|
default |
|
default |
|
default |
|
default |
CustomOpConfigs & Ort::CustomOpConfigs::AddConfig | ( | const char * | custom_op_name, |
const char * | config_key, | ||
const char * | config_value | ||
) |
Adds a session configuration entry/value for a specific custom operator.
custom_op_name | The name of the custom operator for which to add a configuration entry. Must match the name returned by the CustomOp's GetName() method. |
config_key | The name of the configuration entry. |
config_value | The value of the configuration entry. |
const std::unordered_map< std::string, std::string > & Ort::CustomOpConfigs::GetFlattenedConfigs | ( | ) | const |
Returns a flattened map of custom operator configuration entries and their values.
The keys has been flattened to include both the custom operator name and the configuration entry key name. For example, a prior call to AddConfig("my_op", "key", "value") corresponds to the flattened key/value pair {"my_op.key", "value"}.
|
default |
|
default |