TECHNOLOGY

ONNX Runtime 1.32 OrtMemoryInfo: opaque C objects must cross plugin boundaries through the API

In this article
THE QUICK TAKE

The 1.32 OrtMemoryInfo repair uses C API conversion across plugin boundaries; matching concepts do not make private C++ layouts interchangeable.

ONNX Runtime 1.32.0 includes a repair for OrtMemoryInfo crossing the plugin execution-provider boundary. Upstream explains that code copied the opaque object as a C++ structure and read fields directly. The correction reconstructs information through C API accessors, preserving the interface boundary instead of assuming identical internal object layout.

Opaque means layout is not the contract

An opaque C API type exposes supported operations without promising its private C++ representation. Copying that representation across independently built components bypasses the boundary. The PR repairs conversions in both directions, including a WebGPU plugin allocator path. A review should inspect every crossing, because repairing only the host-to-plugin direction leaves the return direction vulnerable to the same assumption about internal layout.

Reconstruction preserves exposed semantics

Using accessors and factory functions copies what the public interface actually exposes. Upstream also documents limitations where an internal property is not available through the C API. That matters when evaluating equivalence: recreating an object is not necessarily a byte-for-byte clone. Qualification should compare the memory-device and allocator semantics required by the consumer, and should not invent guarantees for properties absent from the supported interface.

Test allocator identity at the boundary

A proposed integration test obtains memory information through the plugin allocator, passes it through the supported host API and exercises allocation or binding that uses it. Include the reverse direction as a distinct case. A plugin that merely registers without allocating cannot cover the repaired conversion. Preserve build provenance because an ABI-sensitive test loses explanatory value if the loaded library differs from the one that was just compiled.

This is infrastructure correctness

The release repairs a plugin interoperability mechanism, not a model arithmetic operator. A successful local check supports the exercised allocator path and API properties; it does not prove that every plugin is binary-compatible with every core. This article reports the upstream boundary repair and a verification approach, without claiming new model-quality or throughput results from an object-conversion change.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles