ModelCompilationOptions_SetEpContextEmbedMode property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtModelCompilationOptions> model_compile_options, Bool embed_ep_context_in_model)>> ModelCompilationOptions_SetEpContextEmbedMode
getter/setter pair

\brief Enables or disables the embedding of EPContext binary data into the ep_cache_context attribute of EPContext nodes. Defaults to false.

If enabled, the ep_cache_context attribute of EPContext nodes will store the context binary data, which may include weights for compiled subgraphs.

If disabled, the ep_cache_context attribute of EPContext nodes will contain the path to the file containing the context binary data. The path is set by the execution provider creating the EPContext node.

More details relate to EPContext design refers to: \htmlonly EPContext design document. \endhtmlonly

\paramin model_compile_options The OrtModelCompilationOptions instance. \paramin embed_ep_context_in_model True to embed EPContext binary data into the EPContext node ep_cache_context attributes.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.22.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtModelCompilationOptions> model_compile_options,
      ffi.Bool embed_ep_context_in_model,
    )
  >
>
ModelCompilationOptions_SetEpContextEmbedMode;