Skip to content

Commit bf0bd9c

Browse files
Clean up API tables
1 parent 6334632 commit bf0bd9c

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

docs/execution-providers/plugin-ep-libraries.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ ONNX Runtime discovered during initialization.
328328
The factory returns `OrtEpDevice` instances from `OrtEpFactory::GetSupportedDevices()`.
329329
Each `OrtEpDevice` instance pairs a factory with a hardware device that the factory supports.
330330
For example, if a single factory instance supports both CPU and NPU, then the call to `OrtEpFactory::GetSupportedDevices()` returns two `OrtEpDevice` instances:
331-
- ep_device_0: (factory_0, CPU)
332-
- ep_device_1: (factory_0, NPU)
331+
- ep_device_0: (factory_0, CPU)
332+
- ep_device_1: (factory_0, NPU)
333333
334334
<br/>
335335
<p align="center"><img width="100%" src="../../images/plugin_ep_sd_lib_reg.png" alt="Sequence diagram showing registration and unregistration of a plugin EP library"/></p>
@@ -519,7 +519,7 @@ Opaque type that contains a compiled/fused node's name and host memory allocatio
519519
OrtNodeComputeInfo
520520
</td>
521521
<td>
522-
Struct that contains the computation function for a compiled `OrtGraph` instance. Initialized by an `OrtEp` instance.
522+
Struct that contains the computation function for a compiled <code>OrtGraph</code> instance. Initialized by an <code>OrtEp</code> instance.
523523
</td>
524524
</tr>
525525
@@ -528,7 +528,7 @@ Struct that contains the computation function for a compiled `OrtGraph` instance
528528
OrtEpGraphSupportInfo
529529
</td>
530530
<td>
531-
Opaque type that contains information on the nodes supported by an EP. An instance of `OrtEpGraphSupportInfo` is passed to `OrtEp::GetCapability()` and the EP populates the `OrtEpGraphSupportInfo` instance with information on the nodes that it supports.
531+
Opaque type that contains information on the nodes supported by an EP. An instance of <code>OrtEpGraphSupportInfo</code> is passed to <code>OrtEp::GetCapability()</code> and the EP populates the <code>OrtEpGraphSupportInfo</code> instance with information on the nodes that it supports.
532532
</td>
533533
</tr>
534534
@@ -546,7 +546,7 @@ Enumerates the operator data layouts that could be preferred by an EP. By defaul
546546
OrtMemoryDevice
547547
</td>
548548
<td>
549-
Opaque type that represents a combination of a physical device and memory type. A memory allocation and allocator are associated with a specific `OrtMemoryDevice`, and this information is used to determine when data transfer is required.
549+
Opaque type that represents a combination of a physical device and memory type. A memory allocation and allocator are associated with a specific <code>OrtMemoryDevice</code>, and this information is used to determine when data transfer is required.
550550
</td>
551551
</tr>
552552
@@ -582,11 +582,11 @@ Struct of functions that an EP implements if it needs to support Streams.
582582
<a href="#ort-ep-factory">OrtEpFactory</a>
583583
</td>
584584
<td>
585-
A plugin EP library provides ORT with one or more instances of `OrtEpFactory`. An `OrtEpFactory` implements functions that are used by ORT to query device support, create allocators, create data transfer objects, and create instances of an EP (i.e., an `OrtEp` instance).<br/>
585+
A plugin EP library provides ORT with one or more instances of <code>OrtEpFactory</code>. An <code>OrtEpFactory</code> implements functions that are used by ORT to query device support, create allocators, create data transfer objects, and create instances of an EP (i.e., an <code>OrtEp</code> instance).<br/>
586586
587-
An `OrtEpFactory` may support more than one hardware device (`OrtHardwareDevice`). If more than one hardware device is supported by the factory, an EP instance created by the factory is expected to internally partition any graph nodes assigned to the EP among its supported hardware devices.<br/>
587+
An <code>OrtEpFactory</code> may support more than one hardware device (<code>OrtHardwareDevice</code>). If more than one hardware device is supported by the factory, an EP instance created by the factory is expected to internally partition any graph nodes assigned to the EP among its supported hardware devices.<br/>
588588
589-
Alternatively, if an EP library author needs ONNX Runtime to partition the graph nodes among different hardware devices supported by the EP library, then the EP library must provide multiple `OrtEpFactory` instances. Each `OrtEpFactory` instance must support one hardware device and must create an EP instance with a unique name (e.g., MyEP_CPU, MyEP_GPU, MyEP_NPU).
589+
Alternatively, if an EP library author needs ONNX Runtime to partition the graph nodes among different hardware devices supported by the EP library, then the EP library must provide multiple <code>OrtEpFactory</code> instances. Each <code>OrtEpFactory</code> instance must support one hardware device and must create an EP instance with a unique name (e.g., MyEP_CPU, MyEP_GPU, MyEP_NPU).
590590
</td>
591591
</tr>
592592
@@ -595,7 +595,7 @@ Alternatively, if an EP library author needs ONNX Runtime to partition the graph
595595
<a href="#ort-ep">OrtEp</a>
596596
</td>
597597
<td>
598-
An instance of an Ep that can execute model nodes on one or more hardware devices (`OrtHardwareDevice`). An `OrtEp` implements functions that are used by ORT to query graph node support, compile supported nodes, query preferred data layout, set run options, etc. An `OrtEpFactory` creates an `OrtEp` instance via the `OrtEpFactory::CreateEp()` function.
598+
An instance of an Ep that can execute model nodes on one or more hardware devices (<code>OrtHardwareDevice</code>). An <code>OrtEp</code> implements functions that are used by ORT to query graph node support, compile supported nodes, query preferred data layout, set run options, etc. An <code>OrtEpFactory</code> creates an <code>OrtEp</code> instance via the <code>OrtEpFactory::CreateEp()</code> function.
599599
</td>
600600
</tr>
601601
@@ -604,7 +604,7 @@ An instance of an Ep that can execute model nodes on one or more hardware device
604604
OrtRunOptions
605605
</td>
606606
<td>
607-
Opaque object containing options passed to the `OrtApi::Run()` function, which runs a model.
607+
Opaque object containing options passed to the <code>OrtApi::Run()</code> function, which runs a model.
608608
</td>
609609
</tr>
610610
@@ -613,7 +613,7 @@ Opaque object containing options passed to the `OrtApi::Run()` function, which r
613613
OrtGraph
614614
</td>
615615
<td>
616-
Opaque type that represents a graph. Provided to `OrtEp` instances in calls to `OrtEp::GetCapability()` and `OrtEp::Compile()`.
616+
Opaque type that represents a graph. Provided to <code>OrtEp</code> instances in calls to <code>OrtEp::GetCapability()</code> and <code>OrtEp::Compile()</code>.
617617
</td>
618618
</tr>
619619
@@ -622,11 +622,11 @@ Opaque type that represents a graph. Provided to `OrtEp` instances in calls to `
622622
OrtValueInfo
623623
</td>
624624
<td>
625-
Opaque type that contains information for a value in a graph. A graph value can be a graph input, graph output, graph initializer, node input, or node output. An `OrtValueInfo` instance has the following information.<br/>
625+
Opaque type that contains information for a value in a graph. A graph value can be a graph input, graph output, graph initializer, node input, or node output. An <code>OrtValueInfo</code> instance has the following information.<br/>
626626
<ul>
627-
<li>Type and shape (e.g., `OrtTypeInfo`)</li>
628-
<li>`OrtNode` consumers</li>
629-
<li>`OrtNode` producer</li>
627+
<li>Type and shape (e.g., <code>OrtTypeInfo</code>)</li>
628+
<li><code>OrtNode</code> consumers</li>
629+
<li><code>OrtNode</code> producer</li>
630630
<li>Information that classifies the value as a graph input, graph output, initializer, etc.</li>
631631
</ul>
632632
</td>
@@ -637,7 +637,7 @@ Opaque type that contains information for a value in a graph. A graph value can
637637
OrtExternalInitializerInfo
638638
</td>
639639
<td>
640-
Opaque type that contains information for an initializer stored in an external file. An `OrtExternalInitializerInfo` instance contains the file path, file offset, and byte size for the initializer. Can be obtained from an `OrtValueInfo` via the function `ValueInfo_GetExternalInitializerInfo()`.
640+
Opaque type that contains information for an initializer stored in an external file. An <code>OrtExternalInitializerInfo</code> instance contains the file path, file offset, and byte size for the initializer. Can be obtained from an <code>OrtValueInfo</code> via the function <code>ValueInfo_GetExternalInitializerInfo()</code>.
641641
</td>
642642
</tr>
643643
@@ -704,49 +704,59 @@ Description
704704
705705
<tr>
706706
<td>
707-
RegisterExecutionProviderLibrary
707+
<a href="https://onnxruntime.ai/docs/api/c/struct_ort_api.html#a7c8ea74a2ee54d03052f3d7cd1e1335d">RegisterExecutionProviderLibrary</a>
708708
</td>
709709
<td>
710+
Register an EP library with ORT. The library must export the <code>CreateEpFactories</code> and <code>ReleaseEpFactory</code> functions.
710711
</td>
711712
</tr>
712713
713714
<tr>
714715
<td>
715-
UnregisterExecutionProviderLibrary
716+
<a href="https://onnxruntime.ai/docs/api/c/struct_ort_api.html#acd4d148e149af2f2304a45b65891543f">UnregisterExecutionProviderLibrary</a>
716717
</td>
717718
<td>
719+
Unregister an EP library with ORT. Caller <b>MUST</b> ensure there are no <code>OrtSession</code> instances using the EPs created by the library before calling this function.
718720
</td>
719721
</tr>
720722
721723
<tr>
722724
<td>
723-
GetEpDevices
725+
<a href="https://onnxruntime.ai/docs/api/c/struct_ort_api.html#a52107386ff1be870f55a0140e6add8dd">GetEpDevices</a>
724726
</td>
725727
<td>
728+
Get the list of available OrtEpDevice instances.<br/><br/>
729+
Each <code>OrtEpDevice</code> instance contains details of the execution provider and the device it will use.
726730
</td>
727731
</tr>
728732
729733
<tr>
730734
<td>
731-
SessionOptionsAppendExecutionProvider_V2
735+
<a href="https://onnxruntime.ai/docs/api/c/struct_ort_api.html#a285a5da8c9a63eff55dc48e4cf3b56f6">SessionOptionsAppendExecutionProvider_V2</a>
732736
</td>
733737
<td>
738+
Append the execution provider that is responsible for the provided <code>OrtEpDevice</code> instances to the session options.
734739
</td>
735740
</tr>
736741
737742
<tr>
738743
<td>
739-
SessionOptionsSetEpSelectionPolicy
744+
<a href="https://onnxruntime.ai/docs/api/c/struct_ort_api.html#a2ae116df2c6293e4094a6742a6c46f7e">SessionOptionsSetEpSelectionPolicy</a>
740745
</td>
741746
<td>
747+
Set the execution provider selection policy for the session.<br/><br/>
748+
Allows users to specify a device selection policy for automatic EP selection. If custom selection is required please use
749+
<code>SessionOptionsSetEpSelectionPolicyDelegate</code> instead.
742750
</td>
743751
</tr>
744752
745753
<tr>
746754
<td>
747-
SessionOptionsSetEpSelectionPolicyDelegate
755+
<a href="https://onnxruntime.ai/docs/api/c/struct_ort_api.html#a29c026bc7aa6672f93b7f9e31fd3e4a7">SessionOptionsSetEpSelectionPolicyDelegate</a>
748756
</td>
749757
<td>
758+
Set the execution provider selection policy delegate for the session.<br/><br/>
759+
Allows users to provide a custom device selection policy for automatic EP selection.
750760
</td>
751761
</tr>
752762

0 commit comments

Comments
 (0)