GetSessionConfigEntry property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtSessionOptions> options, Pointer<Char> config_key, Pointer<Char> config_value, Pointer<Size> size)>> GetSessionConfigEntry
getter/setter pair

\brief Get a session configuration value.

Returns a failure status if the configuration key does not exist. The config_key and the format of config_value are defined in onnxruntime_session_options_config_keys.h

If config_value is nullptr, the value of size is set to the true size of the string value (including null-terminator), and a success status is returned.

If the size parameter is greater than or equal to the actual string value's size, the value of size is set to the true size of the string value, the provided memory is filled with the value's contents, and a success status is returned.

If the size parameter is less than the actual string value's size and config_value is not nullptr, the value of size is set to the true size of the string value and a failure status is returned.

Can be used in a custom operator library to get session configuration entries that target one or more custom operators in the library. Example: The config entry custom_op.myop.some_key targets a custom op named "myop".

\paramin options The session options. \paramin config_key A null-terminated UTF-8 string representation of the config key. \paramin config_value Pointer to memory where the null-terminated UTF-8 string value will be stored. \paramin,out size Pointer to the size of the config_value buffer. See above comments for details.

\snippet{doc} snippets.dox OrtStatus Return Value \since Version 1.14

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtSessionOptions> options,
      ffi.Pointer<ffi.Char> config_key,
      ffi.Pointer<ffi.Char> config_value,
      ffi.Pointer<ffi.Size> size,
    )
  >
>
GetSessionConfigEntry;