Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[BUG] Fused MoE auxiliary loss accepts shapes that overflow int offsets

未关闭
#3,568 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@arcusbuilds 已经在做这个了。

开始于 2026年9月24日。

  • #3569 来自 @arcusbuilds —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp

调研方向

Start in transformer_engine/common/fused_router/fused_moe_aux_loss.cu by tracing the index calculation and the forward, graph-safe forward, and backward launchers. Add validation before each launch for shapes whose flattened size exceeds the 32-bit offset limit, with an explanatory error; done means all three launchers reject the reported shape safely.

由索引模型根据 Issue 内容生成。

描述

Describe the bug

The fused MoE auxiliary loss kernels calculate flattened positions as row * num_cols using a 32-bit int. The forward, graph-safe forward, and backward launchers accept shapes for which num_rows * num_cols exceeds INT_MAX. Those positions can overflow before the kernels use them to access memory.

Steps to reproduce

Inspect the index calculation and launchers in fused_moe_aux_loss.cu. For num_rows = 8_388_609 and num_cols = 256, the product is 2_147_483_904, which exceeds INT_MAX.

I found this through source inspection and have not run the oversized kernel, since an overflowing offset may access memory outside the tensor.

Expected behavior

Reject the shape before launching any of the three kernels, with an error explaining the 32-bit offset limit.

Environment

Source commit: 21a066d257afeaf8039325f58df9a62587517976. Runtime reproduction has not been run.

主要语言
Python
星标
3.6k
派生
851
平均合并
4 天 20 小时
30 天内合并 PR
56

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/TransformerEngine 的其他 Issue

查看 NVIDIA/TransformerEngine 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。