In this article
The 1.32 initializer path stages device tensors on CPU before graph processing; CPU borrowing support is not same-device GPU reuse.
ONNX Runtime 1.32.0’s direct-initializer work explicitly keeps device initializers on a copying path through owned CPU staging before graph processing. Borrowing eligible CPU weights does not authorize injecting raw device pointers into optimization or shape inference. These preparation stages can read initializer contents under a host-memory contract.
Preparation can consume constant contents
An initializer can influence constant folding, shape decisions or graph transformations before inference starts. A pointer valid for a CUDA kernel is not automatically readable by those host stages. The release preserves a transfer boundary to owned CPU storage. A proposed test includes an initializer that participates in preparation, not merely a weight read only by the final GPU operation. That makes the host-access requirement observable.
The provider must supply the transfer route
The linked PR uses the registered provider’s data-transfer implementation and reports missing support explicitly. A proposed negative test checks that an unavailable transfer fails clearly rather than allowing the host to dereference a device address. Keep the actual provider registration in the reproduction. A tensor wrapper’s device label and a valid allocation do not by themselves establish that the session can perform the required transfer during initialization.
Source cleanup is tested after staging
Because device inputs are copied, their lifecycle differs from borrowed CPU inputs. A local check should follow the documented creation boundary and verify that later inference uses preserved initializer data after the caller changes or releases its original source where permitted. Do not mix that case with CPU borrowing, whose lifetime obligation is longer. Two tests using the same option can legitimately exercise different ownership policies.
Avoid a misleading zero-copy conclusion
The release deliberately separates CPU borrowing from device staging. A benchmark claiming same-device initializer reuse must establish another supported mechanism rather than borrowing this feature’s name. This article reports the preparation boundary and proposed transfer tests without new memory or latency measurements. The practical outcome is a clearly owned host representation for graph processing, followed by whatever device allocations the selected execution plan requires.
Sources
Related reading
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.