Add headdim 256 md5 and Disable Python GC during timed iterations#24
Open
baoqiwen wants to merge 1 commit into
Open
Add headdim 256 md5 and Disable Python GC during timed iterations#24baoqiwen wants to merge 1 commit into
baoqiwen wants to merge 1 commit into
Conversation
baoqiwen
commented
Jun 26, 2026
| fn() | ||
| # Benchmark | ||
|
|
||
| gc.collect() |
Contributor
Author
There was a problem hiding this comment.
防止 kernel 中恰好出现 gc,统计出错
f79e4ec to
bdafe32
Compare
baoqiwen
commented
Jun 26, 2026
|
|
||
| def generate_random_eviction_mask(batch_size, seqlen_q, seqlen_k, h, start_row=None): | ||
| # np.random.seed(0) | ||
| np.random.seed(0) |
Contributor
Author
There was a problem hiding this comment.
有一次发现该mask单测挂了,有一个很小的精度误差。复现了一下午没复现出来。怀疑是mask没有固定seed,在某一个特殊场景下小幅度超精度上限。
73d91aa to
8afd22c
Compare
baoqiwen
commented
Jun 26, 2026
| # Note(umiswing): fa4 does not support d 256 | ||
| for D in [128]: | ||
| H = 4096 // D | ||
| if D == 192: |
Contributor
Author
There was a problem hiding this comment.
d192/dv128 支持的不全,这里只保留了 d != dv 测试的可能性,但实际上不能测。
baoqiwen
commented
Jun 26, 2026
| @@ -846,15 +853,21 @@ def main(examples: List[str] = ["all"], dtype='bf16'): | |||
| #doc_seq_lens_list = doc_seq_lens_list[::-1] | |||
| # Note(umiswing): fa4 does not support d 256 | |||
| for D in [128]: | |||
Contributor
Author
There was a problem hiding this comment.
d192/dv128 fa4 mask mod 支持的不全面,这里先把功能加上,但是现在不测。
baoqiwen
commented
Jun 26, 2026
| #doc_seq_lens_list = doc_seq_lens_list[::-1] | ||
| for D in [128] if fm_version == 4 else [64, 128, 256]: | ||
| H = 4096 // D | ||
| for D in [128, 192, 256] if fm_version == 4 else [64, 128, 256]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.