Closed
[Documentation|文档反馈]: aclnnSparse4to2QuantMatmulWeightNz 的 index 维度说明与实现不一致 #6444
ddsszAdd on 29 days agoClosed at 28 days ago
29 days ago Added label: documentation
29 days ago Associated pull request
29 days ago Modify description of issue
29 days ago Assign smdbha as responsible person
28 days ago Close issue
28 days ago Added label: resolved
Document Link(文档链接)
aclnnSparse4to2QuantMatmulWeightNz.md
Issues Section(问题文档片段)
index参数说明将输入和 ViewShape 描述为 4 维,并称 StorageShape 与 ViewShape 相同;维度栏也填写为 4。同一文档的调用示例使用 2 维 ViewShape:
std::vector<int64_t> indexShape = {n, (k + 7) / 8};Existing Issues(存在的问题)
参数说明混淆了 ViewShape 和 StorageShape,与示例及接口实现不一致:
OP_CHECK_WRONG_DIMENSION(params.index, MIN_DIM_NUM_ND, return false)校验 index,且MIN_DIM_NUM_ND = 2。按原说明创建 4 维 ViewShape 会触发参数校验失败。indexDims描述 4 维 StorageShape。Suggested Fix(修复建议)
将
index的 ViewShape 说明改为 2 维(n, ceil(k / 8)),同步将维度栏改为 2;明确 StorageShape 由indexDims和indexDimsNum获取,为(ceil(k_half / 32), ceil(n / 16), 16, 8),其中k_half = ceil(k / 8) * 8 / 2。调用示例中的 2 维
indexShape与实现一致,无需修改。关联 PR:https://gitcode.com/cann/ops-nn/merge_requests/11637