Repository navigation
feat: EXPKITS-1441 add optional MLWL inference backend - #184
Conversation
5adf08c to
f994f8e
Compare
There was a problem hiding this comment.
agent: Backend review findings
The discussion reviewed f994f8eb9c610de201528b21c320699d4bb17565. Before publication I checked the current head, d7c37aa4241c8678bb1c9f36cbf43a3ffed26a42. The CPU output visibility concern, all-of readability comment, and setup responsibility comment remained applicable at that revision and were posted inline. The visibility concern was also checked against the newly pinned MLWL 03c9aa11 source.
The following findings are retained here as historical discussion records. They concern the former GraphContext.h, which the current head removes in favor of MLWL's context factory. They are superseded for this OPK diff, not open requests to restore or refactor deleted code.
- [P2] — Select compatible Vulkan features. The former context forwarded the full queried feature chain into device creation. If
robustBufferAccessand an affected descriptor update-after-bind feature are both supported/enabled while the independentrobustBufferAccessUpdateAfterBindproperty is false, that request violatesVUID-VkDeviceCreateInfo-robustBufferAccess-10247. A fake-driver probe demonstrated the forwarding, not an affected physical device. The discussed local correction queried the property and disabled robustness only on conflicting configurations; it passed 64 simulated combinations while preserving the update-after-bind flags. That correction is not present on the remote branch and is no longer needed in the deleted OPK context. Compatibility-property definition. - [P3] — Prefer compile-time fixed storage. The former three-or-four-element extension-name vector unnecessarily allocated storage for fixed literal names. The proposal was a
constexpr std::arrayplus a runtime view/count for the conditionalmaintenance5entry. General principle: represent compile-time-known data/calculations accordingly and structure interfaces to support them; retain genuinely device-dependent checks at runtime. - [P3, nitpick] — Separate nontrivial implementation from the header. There was no identified benefit to keeping the non-template context constructor's full implementation in its header. The request was declarations in
GraphContext.h, implementation/helpers inGraphContext.cpp, and the corresponding Meson source entry. No PImpl or new abstraction was requested. - [P3, nitpick] — Split the context constructor by responsibility. Extension selection/validation, feature querying/compatibility, and queue/device construction were separate jobs embedded in one constructor. The request was focused functions with the constructor expressing orchestration, preserving retries, feature-chain lifetimes, ownership, and errors. The setup responsibility comment applies the same principle to the setup code that remains.
Verification during the original review included five passing build-wrapper tests, the changed artifact-exclusion test, installation of the then-pinned SDK, ten focused tensor checks, and the simulated Vulkan feature-compatibility checks. These are not a full local build or hardware validation of the current head.
|
R002, R003, R004 and R005 no longer apply to the current OPK diff. The custom |
b89ccc2 to
a77b83c
Compare
There was a problem hiding this comment.
agent: Follow-up review at a77b83c20cfc488d7d983861c19dc9694c467935: moving runtime layout validation out of the header is a P3 organization nitpick. CPU output visibility remains deferred/non-blocking in EXPKITS-1488. The all-of and setup responsibility comments are addressed; the comments on the removed custom GraphContext are superseded.
Verified the checksum-pinned dependency installer, five build-wrapper tests, artifact exclusion and ten isolated tensor checks. No full OPK build or physical-device inference rerun.
a77b83c to
cd0b7a4
Compare
346f382 to
f6d306d
Compare
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Move runtime ownership and execution into mlwl::Inference and keep InferenceOp responsible for the Op interface and tensor publication. Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Use the same typed createOp factory and C ABI wrapper as ONNX and ExecuTorch, preserving null and unsupported-name handling. Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Keep setup bindings local and publish output tensor views directly, following the other inference backends. Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Use the supported feature chain directly when creating the graph device. Select the core 1.4 or maintenance5 extension structure for the device API version. Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
Task: EXPKITS-1441 Signed-off-by: Marcell Varga <marcell.varga@arm.com>
f6d306d to
0ba81d0
Compare
Goal
Run VGF models through MLWL using OPK's existing inference interface.
Change
Add an optional backend with tensor validation and checksum-pinned dependencies. Build MLWL at 03c9aa11 and use its context factory for Vulkan device setup.
Disabled by default. Release packaging is not supported yet.
Testing
x86-64 debug build, 70/70 Meson tests, SDK consistency, formatting and licence checks passed.
UltraFace VGF inference returned four detections using CPU Vulkan emulation. Eight invalid descriptor cases were rejected, preserving the first error. Missing DataGraph support produces a startup error. Runtime validation is limited to x86-64 CPU emulation.