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

[Kernel] Marlin_24: Ensure the mma.sp instruction is using the ::ordered_metadata modifier (introduced with PTX 8.5) #5136

Merged

Conversation

alexm-neuralmagic
Copy link
Collaborator

A recently released PTX 8.5 (on May 9, 2024) introduced a new modifier, called ordered_metadata, for the mma.sp 2:4 warp sparse instruction. This modifier requires that the indices in the sparsity metadata are sorted in an increasing order starting from the LSB bit. In our case, in format_24.py lines 96-102, we already have this requirement met due to the following encodings:

    # Encoding quadruples of True/False values as follows:
    #     [True,  True,  False, False] -> 0b0100
    #     [True,  False, True,  False] -> 0b1000
    #     [False, True,  True,  False] -> 0b1001
    #     [True,  False, False, True ] -> 0b1100
    #     [False, True,  False, True ] -> 0b1101
    #     [False, False, True,  True ] -> 0b1110 

Therefore, we can simply add the new modifier and nothing else is required.

@robertgshaw2-neuralmagic robertgshaw2-neuralmagic enabled auto-merge (squash) May 30, 2024 14:44
Copy link
Collaborator

@tlrmchlsmth tlrmchlsmth left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@simon-mo simon-mo disabled auto-merge May 31, 2024 02:02
@simon-mo simon-mo merged commit 6d21fa1 into vllm-project:main May 31, 2024
56 of 64 checks passed
blinkbear pushed a commit to blinkbear/vllm that referenced this pull request May 31, 2024
@simon-mo
Copy link
Collaborator

Hi @alexm-neuralmagic, I'm going to revert this PR because it doesn't compile on CUDA 12.1 and 11.8 and our release pipeline is currently stuck there. Sorry!

https://github.com/vllm-project/vllm/actions/runs/9311899829/job/25631836467#step:8:1873

ptxas /tmp/tmpxft_0000a2c3_00000000-9_marlin_24_cuda_kernel.compute_80.ptx, line 557; fatal   : Parsing error near ':': syntax error

dtrifiro pushed a commit to opendatahub-io/vllm that referenced this pull request May 31, 2024
blinkbear pushed a commit to blinkbear/vllm that referenced this pull request Jun 6, 2024
robertgshaw2-neuralmagic pushed a commit to neuralmagic/nm-vllm that referenced this pull request Jun 8, 2024
joerunde pushed a commit to joerunde/vllm that referenced this pull request Jun 17, 2024
robertgshaw2-neuralmagic pushed a commit to neuralmagic/nm-vllm that referenced this pull request Jul 14, 2024
Temirulan pushed a commit to Temirulan/vllm-whisper that referenced this pull request Sep 6, 2024
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.

4 participants