Qwen-Image 输出 bias 延迟融合,GB300 端到端提速约 6%
值得精读。三个设计点尤其值得关注:其一,能力门控 + 静默回退的窄 fast path 模式(`_can_defer_modelopt_output_bias` 将量化类型、算力、dtype、形状约束集中一处,回退路径与原实现语义完全一致);其二,用原生 BF16 `__hfma` 保持舍入点语义的细节,这是 pin 到生产 `MulAdd` 逐位一致的工程狠活;其三,PR body 用 profiling 数据驱动优化决策(673 次 launch → 224 次可消除),度量方法本身可复用。建议阅读时把 `qwen_image.py` 的 `_bias_mul_add`/`_modulate` 与 `norm_scale_shift.cuh` 的 `bias_mul_add_kernel` 对照看,能完整理解融合路径与回退路径的切换逻辑。
参与讨论