Class that represents session configuration entries for one or more custom operators.
More...
#include <onnxruntime_cxx_api.h>
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.
◆ CustomOpConfigs() [1/3]
Ort::CustomOpConfigs::CustomOpConfigs |
( |
| ) |
|
|
default |
◆ ~CustomOpConfigs()
Ort::CustomOpConfigs::~CustomOpConfigs |
( |
| ) |
|
|
default |
◆ CustomOpConfigs() [2/3]
◆ CustomOpConfigs() [3/3]
◆ AddConfig()
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.
- Parameters
-
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. |
- Returns
- A reference to this object to enable call chaining.
◆ GetFlattenedConfigs()
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"}.
- Returns
- An unordered map of flattened configurations.
◆ operator=() [1/2]
◆ operator=() [2/2]