Skip to content

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

Open
@pipul

Description

@pipul
    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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions