已关闭
[Bug-Report|缺陷反馈]: tensor print issue #416
RiccardoFiorentini创建于 15 天前关闭于 8 天前
15 天前 添加了label:bug-report
15 天前 关联了pull request:Fix CATLASS tensor printing ShapeInfo serialization
15 天前 将 RiccardoFiorentini 设为负责人
13 天前 关联了pull request:dsl: 合入迁移后剩余 dsl 提交(l0c2l1 / ShapeInfo / compose / README)
13 天前 关联了pull request:dsl: 合入迁移后剩余 DSL 提交(不含 include/,基于最新 master)
8 天前 issue状态由 进行中 改变为 已完成
8 天前 关闭了 issue
感谢提出缺陷反馈的相关Issue,请按照下述模板以描述遇到的问题。
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
The current CATLASS tensor-print flow can fail at runtime with:
malformed tensor print FIFO: tensor shape contains trailing metadata
This happens when Cube or Vector tensor-print helpers construct AscendC::ShapeInfo with rank 1 or rank 2, but the inactive slots in the internal fixed-size shape and originalShape arrays are not explicitly zero-initialized before DumpTensor
serializes the record. On CANN 9.1.0 / C310, the serializer can copy all eight shape slots, so stale stack data may enter the FIFO and be rejected by CATLASS’s strict decoder. The failure is deterministic in the interface contract, but the exact
trailing values may vary from launch to launch.
This affects Cube GM, Vector GM, Vector UB, and mixed-core paths that use the tensor-print helpers. Valid tensor-print calls should not require callers to append fake dimensions, and they should not fail when the logical rank and active extents
are correct.
Environment / 环境信息 (Mandatory / 必填)
Ascend hardware model: C310 (NPU_ARCH == 3510)
Software environment:
If you want, I can also format this as a single paragraph for direct pasting into the form.
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
Set up CATLASS DSL on CANN 9.1.0 with a C310 target.
Build or rebuild the tensor-print helper bitcode so the latest Cube/Vector helper is selected.
Run a tensor-printing kernel that uses AscendC::DumpTensor with a rank-1 or rank-2 ShapeInfo, through one of the supported paths:
Force kernel recompilation if a cached kernel may exist, so the rebuilt helper is actually used.
Keep the launch tensor-print-only:
Execute the example and inspect the output.
Expected result:
Actual result:
If you want, I can also turn this into a more formal issue-report paragraph instead of a step list.
Describe the expected behavior / 预期结果 (Mandatory / 必填)
Tensor printing should work normally for valid rank-1 and rank-2 AscendC::ShapeInfo inputs. The inactive slots in shape and originalShape should not affect serialization, and DumpTensor should not raise malformed tensor print FIFO: tensor shape
contains trailing metadata. The output should be decoded and formatted correctly, with GM and UB tensor-print paths behaving consistently.
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
Runtime error observed during tensor printing:
malformed tensor print FIFO: tensor shape contains trailing metadata
This occurs after calling AscendC::DumpTensor with a valid rank-1 or rank-2 ShapeInfo on CANN 9.1.0 / C310. The failure appears in Cube GM, Vector GM, and Vector UB tensor-print paths when the helper serializes nonzero inactive shape slots.
If you have a screenshot or raw log, attach it here as well.
Special notes for this issue/备注 (Optional / 选填)
This issue is specific to the producer-side ShapeInfo serialization in CATLASS’s tensor-print helpers. It is not caused by the logical tensor rank or by the caller supplying an invalid shape. A caller-side workaround such as appending fake
trailing zeros should not be required. The problem affects only Cube and Vector GM/UB tensor printing; L1/L0 tensor printing and mixed scalar/tensor launches are out of scope.