Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are the test performance results of tests/test_flash_mla.py accurate? #59

Open
pipul opened this issue Mar 3, 2025 · 0 comments
Open

Comments

@pipul
Copy link

pipul commented Mar 3, 2025

    def flash_mla():
        torch.cuda.synchronize()
        tile_scheduler_metadata, num_splits = get_mla_metadata(cache_seqlens, s_q * h_q // h_kv, h_kv)

I added a sync(), and found that the performance was much worse. With sync(), it took 360us, while without it, it only took 50us.

Why does it feel like the cost time is a CPU's time? (The kernel submits asynchronously and hasn't finished executing yet.)

@pipul pipul changed the title python tests/test_flash_mla.py 测试性能结果准确吗? Are the test performance results of tests/test_flash_mla.py accurate? Mar 3, 2025
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

No branches or pull requests

1 participant