Skip to content

[Bug] 修复torch\torch_npu回退问题 - #81

Open
Just-it wants to merge 5 commits into
mainfrom
br_claude_ascend
Open

[Bug] 修复torch\torch_npu回退问题#81
Just-it wants to merge 5 commits into
mainfrom
br_claude_ascend

Conversation

@Just-it

@Just-it Just-it commented Apr 13, 2026

Copy link
Copy Markdown
Owner

变更说明

变更类型

  • 新增算子 / Skill
  • 性能优化
  • Bug 修复
  • Benchmark(新增 case / 修改评测逻辑)
  • Agent / 框架改动
  • 文档 / 基础设施

影响范围

  • Triton 侧
  • AscendC 侧
  • 共享(router / benchmark-scheduler)

性能数据(涉及算子生成/优化时必填)

Benchmark 评测(与 BASELINE.md 对比)

指标 BASELINE 本次评测
编译通过数
精度通过数
平均 Speedup

测试环境

  • 设备型号:
  • CANN 版本:
  • PyTorch 版本:

冒烟测试(涉及算子生成/框架改动时必填)

  • Triton 通路:✅ / ❌(失败原因:)
  • AscendC 通路:✅ / ❌(失败原因:)

验证清单

  • 双通路冒烟测试通过
  • 通过率不退化(编译、精度均 >= BASELINE)
  • 平均 Speedup 不退化(>= BASELINE × 0.95)
  • 性能优化类:已跑全量评测、逐任务无退化、至少 1 个提升 >= 5%

退化说明(如有通过率下跌)

zhshgmail and others added 2 commits April 13, 2026 14:43
问题:INPUT_CASES 中 indices 的 range=[0, num_weights],
_make_tensor 使用 randint(0, num_weights+1),可生成 index=num_weights,
对 output[num_weights, emb_dim] 越界写入。

CANN 对越界索引写入未定义内存导致输出损坏,任何正确实现(跳过越界)
会与 CANN 的损坏输出不匹配。

修复:将所有 30 个 case 的 range 上界从 num_weights 改为 num_weights-1。

Fixes #83
修复 24_EmbeddingDenseBackward 索引越界问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants