[BUG] Fused MoE auxiliary loss accepts shapes that overflow int offsets
维护者通常 2 天内回复
评估
- 难度
- 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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/TransformerEngine 的其他 Issue
-
[Bug] group_quantize_fp8_blockwise: mbarrier invalidated before other threads finish waiting on it未关闭
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/TransformerEngine#3647 ·
维护者通常 2 天内回复
-
[PyTorch] fp8_cs_quantize fake implementation returns a vector inverse scale instead of a scalar可能已有人在做 @sanjana658 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/TransformerEngine#3636 · 2 条评论 ·
维护者通常 2 天内回复
-
[Bug] Backend selection picks FA3 for training with head_dim_qk=192 / v_head_dim=128, but FA3 backward cannot run it可能已有人在做 @yuweih205 于 32 天前认领。 未关闭attention
难度 2/5 1-3 小时 新手友好度 85/100
NVIDIA/TransformerEngine#3481 · 4 条评论 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
NVIDIA/TransformerEngine#2189 · 7 条评论 · 5 个 reaction ·
维护者通常 2 天内回复
-
Fused gemm + comm for CP A2A on Blackwell可能已有人在做 @cyanguwa 今天认领。 未关闭2.22 attention
NVIDIA/TransformerEngine#3664 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 NVIDIA/TransformerEngine 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
mishraprafful/multihull#150 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
python-caldav/caldav#735 ·
维护者通常 1 天内回复
-
bug triage
难度 2/5 1-3 小时 新手友好度 68/100
mealie-recipes/mealie#8682 ·
维护者通常 1 天内回复
-
good first issue lane:repo
难度 2/5 1-3 小时 新手友好度 85/100