OpenVINO ships models as two sibling files:
model.xml topology + per-tensor (offset, size, dtype, shape)
model.bin raw weight blob; each Const layer's data
lives at the offset+size declared in the XML.
This is the cleanest tensor-archive format of all the
ones the substrate has ingested so far — "raw bytes at
offset+size in a sibling file."
SCOPE — what wave 39 does
Parse `.xml` streaming via quick-xml (already a
workspace dep). Extract every `<layer type="Const">`'s
`name` + `<data element_type=, shape=, offset=, size=/>`
attributes. mmap the sibling `.bin`. Surface as:
OvModel {
xml_path, bin_path,
net_name, ir_version,
tensors: Vec<OvTensorInfo>,
bin_mmap,
}
OvTensorInfo { id, name, dtype, shape, bin_offset, bin_size }
read_openvino_ir(path/to/model.xml) auto-resolves the
sibling .bin (same basename + .bin extension). On load
every Const layer's (offset, size) is bounds-checked
against the .bin file length, so corrupt XML refusing
to fit triggers OvError::BinOutOfBounds at parse time
rather than at first slice.
tensor_bytes(&t) returns Some(&[u8]) into the .bin
mmap. The substrate primitive.
DTYPE COVERAGE
All documented OpenVINO IR element types:
f64 f32 f16 bf16
i64 i32 i16 i8 i4
u64 u32 u16 u8 u4 u1
boolean string
f8e4m3 f8e5m2 f8e8m0 f4e2m1
nf4
Case-insensitive parse. Unknown values pass through as
Unknown(String) — same forward-compat strategy as the
other readers.
SCOPE — what wave 39 does NOT do
No operator graph execution. No edge / port traversal.
No reshape / fuse pattern matching. JouleClaw has its
own kernel suite.
NEW FILES
crates/jouleclaw-loader-gguf/src/openvino.rs
crates/jouleclaw-loader-gguf/examples/load_openvino.rs
lib.rs: + pub mod openvino;
Cargo.toml: + quick-xml workspace dep
TESTS (7 new)
dtype_parse_round_trip f32/F32/bf16/nf4/u1/f8e4m3/unknown
dtype_element_sizes sub-byte sentinels
synthetic_ir_round_trip full XML→bin walk, 2 tensors
missing_bin_sibling_returns_error .xml without .bin
out_of_bounds_offset_detected .bin too small for declared size
ir_with_no_const_layers_loads empty model edge case
malformed_shape_attribute_errors "2,abc,3" rejected
loader-gguf: 193 → 200 tests.
NEXT — Wave 40: document why TensorRT engines can't be
substrate-ingested (opaque NVIDIA binary, version-locked
to driver + arch).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
6 lines
187 B
JSON
6 lines
187 B
JSON
{
|
|
"alg": "EdDSA (COSE -8)",
|
|
"profile": "jcp.receipt/1",
|
|
"pubkey_hex": "ea4a6c63e29c520abef5507b132ec5f9954776aebebe7b92421eea691446d22c",
|
|
"steward": "did:example:jcp-reference"
|
|
}
|