GetCompatibilityInfoFromModelBytes property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<Void> model_data, Size model_data_length, Pointer<Char> ep_type, Pointer<OrtAllocator> allocator, Pointer<Pointer<Char>> compatibility_info)>> GetCompatibilityInfoFromModelBytes
getter/setter pair

\brief Extract EP compatibility info from precompiled model bytes in memory.

Same as GetCompatibilityInfoFromModel but reads from a memory buffer instead of a file. Useful when precompiled models are loaded from encrypted storage, network, or other non-file sources.

\note This API performs standalone model parsing, separate from session creation. This means the protobuf parsing cost is incurred here and again during session creation. It is intended for scenarios where applications need to check compatibility before deciding whether to proceed with session creation, such as providing early user feedback.

\paramin model_data Pointer to the model data in memory. \paramin model_data_length Size of the model data in bytes. \paramin ep_type The execution provider type string. Must be non-empty. \paramin allocator Allocator to use for the output string. Use OrtApi::GetAllocatorWithDefaultOptions. \paramout compatibility_info Output pointer to the compatibility info string. Returns nullptr if no compatibility info exists for the specified EP. Caller must free with OrtApi::AllocatorFree when non-null.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.24.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<ffi.Void> model_data,
      ffi.Size model_data_length,
      ffi.Pointer<ffi.Char> ep_type,
      ffi.Pointer<OrtAllocator> allocator,
      ffi.Pointer<ffi.Pointer<ffi.Char>> compatibility_info,
    )
  >
>
GetCompatibilityInfoFromModelBytes;