名留青册,虚位以待 · Reserve the AMD NPU provider contract - #65
Merged
Merged
Conversation
eric8810
commented
Sep 29, 2026
eric8810
left a comment
Contributor
Author
There was a problem hiding this comment.
自审报告
已核实正确
- 接入点对称完整:enum(
types.hpp)→ addon parse/string → TS 类型 → CLI/帮助文本 → document CLI → serverEXECUTION_MODE→ benchmark → docs/CHANGELOG,无遗漏。 - 失败链路完整且被测试锁定:
known_provider加amdnpu后,runtime descriptor 可合法声明它(valid_runtime_policy通过),Core 候选处返回provider_abi_mismatch;该原因不在 D112 skippable 列表,Auto 下同样 fatal——auto_policy_with_amdnpu_fails_fast_instead_of_silently_skipping专门防止将来被改成静默跳过。 - 精度契约:仅
automatic(fp16/fp32 均拒绝),与预研待决问题 #2(INT8 vs BF16)不预设的决策一致;deviceId拒绝。 - capability 语义:
ProviderCapabilityInfo{"amdnpu", false, false, false}—— 当 policyavailable_providers含amdnpu而ordered_candidates不含时创建可走 cpu 成功,此时 capability 准确反映"Core 无法兑现";ordered 含 amdnpu 时创建必败、capability 不可达。与 openvino 的package_included=true差异是有意的:无后端构建不应声称包内包含。 - 测试结构与 openvino 系列完全对称(同款 test policy 形态);本地验证:unit 90/90(含 4 个新测试)、ctest 4/4、runtime 35/35、server 20/20。
- PR 描述已按模板填写 Summary/Verification/Checklist。
小问题(非阻塞,可本 PR 修或留 follow-up)
docs/amd-npu-acceleration.md§7 第 1 条:"D113 未覆盖的 新维度"——"的"与"新"之间多一个空格。amdnpu_accepts_only_automatic_precision只覆盖fp16;fp32同样应拒绝,对称测试各测了一个精度,建议本测试两个都断言。tests/integration/main.cpp的accelerators列表只查webgpu/openvino:当前 builtin policy 永不含amdnpu,正确;将来引入LIGHT_OCR_HAS_AMDNPU构建时需同步(预研文档 Phase B 已覆盖此边界)。engine.cppcapability push 的单行初始化格式与相邻条目的多行格式略不一致,纯风格。
Contributor
Author
|
自审报告中的问题 1(文档空格)与问题 2(fp32 断言)已在 c3b7c93 修复;补测时顺带修正了重用已 move 的 bundle 的笔误,每段断言独立构造 bundle。本地重跑 unit 90/90 通过。问题 3、4 留作记录,不需要本 PR 处理。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
amdnpuexecution provider name across the C++ enum, the Node addon, TypeScript types, CLI flags (--provider), the document CLI, and the serverEXECUTION_MODE.amdnpufails withprovider_abi_mismatch(fatal in Auto as well, per D112 — a descriptor the Core cannot honor is a package error, never silently skipped), and explicitprovider: "amdnpu"on current packages returnsunsupported_capability.automatic); the INT8/BF16 choice is pre-study open question feat: add encoded JPEG/PNG image input #2 and deliberately not encoded yet.deviceIdstays rejected.linux-device-acceleration.md§6.cli-design.mdand the package README document the value as reserved.Verification
build/amdnpu-dev, Release),light_ocr_unit_tests90/90 passed including 4 newamdnputests (precision contract, bundled-provider gate, abi mismatch, Auto fail-fast);ctest4/4 passed (unit, integration, memory gate, tiled).packages/runtime35/35 passed,packages/light-ocr-server20/20 passed.bindings/nodeadapter tests: 15/19 passed locally; the 3 failures require a prebuilt addon viaLIGHT_OCR_NODE_BINARYand are environment preconditions, not regressions (CI builds the addon first).Checklist
CHANGELOG.mdwere updated for user-visible changes, otherwise this is N/A.