Skip to content

Support fa3/fa4 flashmask benchmarking and testing with versioned ground truth and multi-row radar plots#25

Open
baoqiwen wants to merge 2 commits into
umiswing:masterfrom
baoqiwen:bqw_sm90
Open

Support fa3/fa4 flashmask benchmarking and testing with versioned ground truth and multi-row radar plots#25
baoqiwen wants to merge 2 commits into
umiswing:masterfrom
baoqiwen:bqw_sm90

Conversation

@baoqiwen

Copy link
Copy Markdown
Contributor

benchmark_flashmask.py:新增 --backend 参数(cpp/cutedsl),仅 fa3 允许切换后端(fa4 恒 cutedsl、fa1/fa2 仅 cpp,非 fa3 传 cutedsl 会报错);Global Sliding Window 用例改为 fa3 启用、fa4 关闭。

test_fwd_md5sum.py / test_bwd_md5sum.py:ground truth 文件名按 fa_versions 带版本后缀(flashmask_{fwd,bwd}_gt_fa3.json / _fa4.json),录制、加载、存在性检查统一走 get_gt_filename(),使 fa3 和 fa4 的 gt 可共存。

gt json 文件:原 fa4 的 flashmask_{fwd,bwd}_gt.json 重命名为 fa4.json;新增 fa3 的 flashmask{fwd,bwd}_gt_fa3.json。

test_flashmask.py:(2, 7600, 7600, 32, 8) fa3 跳过(避免 OOM)。

plot_radar.py:把单行雷达图重构为多行网格(plot_radar_grid,fwd/bwd/total 一张图);类别按 Operation 名称对齐取交集,避免不同 benchmark 掩码集合错位;新增 total 提升百分比区间统计与 suptitle;字体改 DejaVu Sans、屏蔽 matplotlib 警告、plt.close 收尾。

@baoqiwen
baoqiwen force-pushed the bqw_sm90 branch 5 times, most recently from 8aec933 to fa8c67b Compare July 24, 2026 09:36
Comment thread benchmark_flashmask.py
DV,
dtype = 'bf16',
use_sink = False,
backend = 'cpp',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

允许 fa3 性能测试用原来的 cpp 版本以及新增实现 cutedsl 版本

Comment thread benchmark_flashmask.py
}

# Global Sliding Window is enabled for fa3, but disabled for fa4.
if fm_version == 3:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fa3 新增 global sliding window 测试

@baoqiwen
baoqiwen force-pushed the bqw_sm90 branch 2 times, most recently from a2e936d to ac861b5 Compare July 24, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant