Commit a91086f
committed
[VitisAI] Recognize native-endian in-memory address tag in process_ext_address
ORT marks initializers whose data lives in an in-process memory buffer with one
of two location sentinels: the original little-endian tag "*/_ORT_MEM_ADDR_/*"
(kTensorProtoLittleEndianMemoryAddressTag) and the newer native-endian tag
"*/_ORT_NATIVE_ENDIAN_MEM_ADDR_/*" (kTensorProtoNativeEndianMemoryAddressTag).
Since #27404, TensorToTensorProto() emits the native-endian tag by default, but
the VitisAI EP's process_ext_address only matched the little-endian tag.
As a result, in-memory initializers (e.g. quantized weights moved out of the
TensorProto during graph optimization) are no longer detected by model_clone,
fall through to the verbatim-copy branch, and carry the in-memory marker into
the cloned model protobuf. After #28709 added an explicit ORT_ENFORCE in
Graph::Graph rejecting in-memory address markers in deserialized protobufs, this
now aborts model compilation with:
Initializer '...' references an ORT in-memory address marker, which is not
allowed in a model protobuf.
Both tags encode the buffer address in the 'offset' field; on little-endian
hosts (the only platform this EP targets) the byte layout is identical, so they
are decoded the same way. Recognizing both tags restores the pre-1.27 behavior
of converting these initializers to a lightweight reference during model_clone.1 parent ba45260 commit a91086f
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
| |||
0 commit comments