grouped_matmul_swiglu_quant_v2 的 MXFP4 场景中,ND 和 NZ weight format 对 DT_FLOAT4_E1M2 的支持范围不同,但现有 dtype 校验容易把两类场景混在同一套支持列表中处理。
grouped_matmul_swiglu_quant_v2
DT_FLOAT4_E1M2
具体表现:
x
weight
output
DT_FLOAT4_E2M1
CheckFp4DtypeValid
CheckDtypeValid
https://gitcode.com/cann/ops-transformer/pull/8787
/assign @jayshu
问题描述
grouped_matmul_swiglu_quant_v2的 MXFP4 场景中,ND 和 NZ weight format 对DT_FLOAT4_E1M2的支持范围不同,但现有 dtype 校验容易把两类场景混在同一套支持列表中处理。具体表现:
x/weight/output不应支持DT_FLOAT4_E1M2,仅支持DT_FLOAT4_E2M1。x/weight/output可支持DT_FLOAT4_E2M1和DT_FLOAT4_E1M2。DT_FLOAT4_E1M2,或 NZ 场景误拦截合法输入。期望修改
CheckFp4DtypeValid根据 weight storage format 选择对应的x/weight/outputdtype 支持列表。CheckDtypeValid的前置判断同步按 ND/NZ 区分。DT_FLOAT4_E1M2场景的标准 error message 上报。关联PR
https://gitcode.com/cann/ops-transformer/pull/8787