Open
fix: match MXFP8 module filters against full FQNs #200
MuuAdd on 10 hours ago
fix: match MXFP8 module filters against full FQNs #200
Open
Merge blocked
10 hours ago Added label: ascend-cla/yes
ascend-robot
10 hours ago Comments:
10 hours ago Comments:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
PR Approval Progress
⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-Ascend/torchao-ascend | ❌ (0/2)(You can also ask: liangsongwei, wanglijun55, jishuangfeng, chengpeng25, sylvia_wei) | ❌ (0/1)(You can also ask: 褚博宁, 楚浩田, chengpeng25, chujinjin, wanglijun55) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
Muuyo, thanks for your pull request. All authors of the commits have signed the CLA. 👍


【修改说明】
_apply_modules_match在模式匹配前把模块 FQN 截断到layers.N前缀。寻址完整模块路径的 pattern(如layers.{*}.attention.wq_a)永远无法命中截断后的前缀,过滤器对所有非前缀 pattern 返回 False:quantize_在运行报告 MXFP8 的同时把选中模块静默留在 bf16。改为对完整 FQN 匹配。前缀式 pattern(
layers.{*})语义不变(*本就跨点),截断还破坏了无layers.N段的容器路径。【背景】
问题在 torchtitan-ascend !333(DeepSeek V4.1 MXFP8)的接入中发现:其 plan 使用全 FQN pattern,
TestRealFilters直接 exec 本仓 filters 源码,官方版 filters 下 4 例中 2 例失败(本地修复版全过),已实证该截断的静默零命中。【验证结果】
TestRealFilters4 例在本修复下全部通过(含 dense 全 FQN 匹配、moe 容器匹配、排除 pattern 优先级)。layers.{*})在修复前后命中集合一致(*跨点匹配完整 FQN 与匹配layers.N前缀等价)。git diff --check干净。【兼容性影响】
仅影响向
mxfp8_apply_modules传入全 FQN pattern 的调用方——修复前这类调用静默零命中(bf16),修复后按语义命中。前缀式 pattern 行为不变。torchtitan-ascend !333 依赖本 MR 先行合入。