Repository navigation
轻芯贯卷,双路同归 · Complete lightweight AMD recognition backend - #71
Merged
Merged
Conversation
eric8810
marked this pull request as ready for review
October 7, 2026 14:51
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.
完整改造
本 PR 已从首个矩阵子图原型推进到完整 Small 识别 CPU/NPU 分区后端与可安装独立包。
[1,3,48,width] → [1,width/8,18710],生成全部 20 个宽度桶;原有 CTC/字典保持一致。build_amdaie.py完成工具链、运行库、20 桶与 SDK 组装,CI 默认切换至轻量源码构建。execution.provider="amdnpu"启用,不进入默认 Auto,主 package 不含 AMD/OpenVINO。cpuPartition=forbid拒绝此分区后端。实际构建和封装
全部 20 桶、运行库和 addon 已编译完成,已实际生成
@arcships/light-ocr-amdnpu-linux-x64-gnu@0.5.9tarball。下载相比历史 vendor 包的 548,609,874 bytes 缩小约 94.9%,满足 64 MiB 下载 / 128 MiB 解包门禁。
npm SHA256:
2bee7052a4dbfcfea8338e1fa06e42061fc77b9d4aee21d52794f9f28cc4e8b8。构建与逐文件记录见
docs/amd-aie-deployment-results.json;用法、完整构建步骤、方案、CHANGELOG 和中英文 0.5.9 release notes 已同步。0.5.9 继续采用补丁版本,尚未发布 npm 或公开 Release。2026-10-08 无设备软件检查
unsupported_capability;Auto 选择 CPU 并完成空白图 OCR;拒绝cpuPartition=forbid。sessionFallback="cpu"不受支持,已测试其明确拒绝行为,不宣称自动回退。null时泄漏普通 TypeError 的问题,统一为package_load_failed;添加缺失/损坏权重、库存、桶顺序和 ABI 等回归用例。rtol=1e-3, atol=1e-4下全部通过;这些样本的 CTC 序列均一致,文字样本为HELLO 123。5.79e-4;BF16 CPU 模拟约0.0374。合成输入均解码为空,单个文字样本不构成数据集准确率证据。check_cpu_recognition.py。结果见
docs/amd-aie-software-validation-results.json,重现命令见docs/amd-aie-development.md。原有 AMD tarball 字节与 SHA256 未改变;运行时 JS 修复随 runtime 发布准备更新。维护者要求与实际边界
初次构建按要求跳过验证;2026-10-08 经维护者同意补充了上述无设备软件检查。仍未执行 AMD 设备推理或性能验收。
deviceValidated=false、numericsValidated=false保持不变:CPU BF16 模拟不能证明 AMD BFP16ebs8 内核正确。用户仍需可用的 amdxdna 系统驱动与固件。本次 AMD 改造未解决主 Small 模型既有 39 MB 要求与当前约 52.53 MB tgz 的差额,发布说明如实保留该项。