谢谢反馈,请及时完成相关PR合入


seems some not related PR link to current issue, it's not a best practice, please avoid it


I checked the links. !6724 is the fix for this issue: it normalizes concrete negative SymbolicScalar indices, and the Issue and PR bodies link to each other. GitCode also lists !6699 (“Upload for Tile Check”) and !6726 (“Upload for load_unalign”) as associated with #3455, although their PR bodies do not reference this issue. I did not add those links; could you remove those associations if they were added by mistake?
!6724 is still open. Its current head 6898955eba31a78e3292fec8f9345492046118f8 has ci-pipeline-passed; all reported merge gates pass except this account lacks PUSH permission. Could a maintainer with push permission merge it when convenient?


The associated PR has been merged. This issue is scheduled to be closed. Feel free to reach out if you have any further questions.


@tsungl4 @seu_chang 您好,这个 Issue 对应的修复已经合入:https://gitcode.com/cann/pypto/merge_requests/6724
开发者计划反馈,Issue 需要有 Accepted 标签才能计入积分,仅关闭或标记 resolved 还不够。目前这条 Issue 尚未标记 Accepted,麻烦您结合问题和已合入的修复复核一下;确认符合受理条件后,帮忙补上 Accepted 标签。
感谢您的支持!


[Bug-Report|缺陷反馈]: 负的具体 SymbolicScalar Tensor 索引未归一化
问题
Tensor.__getitem__支持int和SymbolicScalar索引,并声明支持 Python 风格负索引。对于长度为 4 的 Tensor,Host lowering 将x[-1]转为偏移3,但x[pypto.SymbolicScalar(-1)]保留偏移-1。复现
构造长度为 4 的 Tensor,分别访问
x[-1]与x[pypto.SymbolicScalar(-1)],比较 Host lowering 生成的GetTensorData偏移。预期 / 实际
3。3,具体负SymbolicScalar索引的偏移为-1。影响与修复
等价索引被降低为不同 Tensor 坐标,可能读取错误元素。修复将编译期已知的负
SymbolicScalar按轴长归一化,并保留动态符号索引原有行为。设备运行时结果未在本次验证中确认。Validation
验证记录
长度为 4 的
DT_INT32Tensor 上,修复前的 Host lowering 为x[-1]生成偏移3,为x[SymbolicScalar(-1)]生成偏移-1。应用修复后,两种索引都生成偏移3;3 项归一化断言通过,动态符号索引仍保留原对象。提交前将补丁应用到目标
master基线并通过git diff --check。修改的 Python 文件通过 PyPTO 适用的 pre-commit 检查(Ruff、切片冒号格式、空白与文件完整性检查)及py_compile。PyTest 与设备运行时对照未执行。本次结论限于 Host lowering 和索引归一化结果,没有声称观察到设备输出。
关联 PR: https://gitcode.com/cann/pypto/merge_requests/6724