Skip to content

Fused triton quantize-dequantize in forward helpers - #812

Draft
ElizaWszola wants to merge 9 commits into
vllm-project:mainfrom
ElizaWszola:triton-dequantize-forward-helpers
Draft

Fused triton quantize-dequantize in forward helpers#812
ElizaWszola wants to merge 9 commits into
vllm-project:mainfrom
ElizaWszola:triton-dequantize-forward-helpers

Conversation

@ElizaWszola

@ElizaWszola ElizaWszola commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Benchmark output:

==================================================================================================================================
SUMMARY
==================================================================================================================================
Config               Size            Fused (ms)   T+T (ms)     T+Py (ms)    vs T+T     vs T+Py    Correct   
----------------------------------------------------------------------------------------------------------------------------------
int8_tensor          4096x4096            0.33 ms      0.56 ms      0.55 ms   1.69x     1.68x   Yes       
int8_tensor          4096x11008           0.35 ms      0.61 ms      0.81 ms   1.72x     2.29x   Yes       
int8_tensor          8192x8192            0.38 ms      0.72 ms      0.79 ms   1.87x     2.06x   Yes       
int4_tensor          4096x4096            0.14 ms      0.27 ms      0.27 ms   1.87x     1.87x   Yes       
int4_tensor          4096x11008           0.35 ms      0.61 ms      0.65 ms   1.75x     1.87x   Yes       
int4_tensor          8192x8192            0.39 ms      1.67 ms      0.79 ms   4.28x     2.04x   Yes       
int8_channel         4096x4096            0.15 ms      0.23 ms      0.23 ms   1.55x     1.55x   Yes       
int8_channel         4096x11008           0.37 ms      0.58 ms      0.61 ms   1.58x     1.68x   Yes       
int8_channel         8192x8192            0.41 ms      0.70 ms      0.76 ms   1.69x     1.84x   Yes       
int4_channel         4096x4096            0.15 ms      0.23 ms      0.23 ms   1.55x     1.56x   Yes       
int4_channel         4096x11008           0.36 ms      0.58 ms      0.62 ms   1.60x     1.69x   Yes       
int4_channel         8192x8192            0.41 ms      0.70 ms      0.76 ms   1.72x     1.87x   Yes       
int8_g128            4096x4096            0.21 ms      0.30 ms      0.26 ms   1.38x     1.21x   Yes       
int8_g128            4096x11008           0.42 ms      0.64 ms      1.05 ms   1.50x     2.49x   Yes       
int8_g128            8192x8192            0.64 ms      0.97 ms      1.64 ms   1.51x     2.54x   Yes       
int4_g128            4096x4096            0.39 ms      0.57 ms      0.51 ms   1.46x     1.32x   Yes       
int4_g128            4096x11008           0.41 ms      0.62 ms      0.62 ms   1.50x     1.50x   Yes       
int4_g128            8192x8192            0.64 ms      0.97 ms      0.86 ms   1.52x     1.35x   Yes       
fp4_g16              4096x4096            0.38 ms      0.56 ms      0.51 ms   1.48x     1.34x   Yes       
fp4_g16              4096x11008           0.48 ms      0.66 ms      0.64 ms   1.38x     1.33x   Yes       
fp4_g16              8192x8192            0.63 ms      0.96 ms      0.85 ms   1.53x     1.35x   Yes       
fp4_g32              4096x4096            0.21 ms      0.29 ms      0.26 ms   1.39x     1.22x   Yes       
fp4_g32              4096x11008           0.46 ms      0.64 ms      0.62 ms   1.39x     1.36x   Yes       
fp4_g32              8192x8192            0.63 ms      0.97 ms      0.85 ms   1.53x     1.35x   Yes       
int4_g128_asym       4096x4096            0.27 ms      0.41 ms      0.43 ms   1.52x     1.60x   Yes       
int4_g128_asym       4096x11008           0.45 ms      0.65 ms      0.76 ms   1.45x     1.69x   Yes       
int4_g128_asym       8192x8192            0.88 ms      1.46 ms      1.28 ms   1.66x     1.46x   Yes       
int8_b128x128        4096x4096            0.33 ms      0.53 ms      0.52 ms   1.59x     1.57x   Yes       
int8_b128x128        8192x8192            0.43 ms      0.69 ms      0.77 ms   1.63x     1.80x   Yes  

Signed-off-by: ElizaWszola <ewszola@redhat.com>
Signed-off-by: ElizaWszola <ewszola@redhat.com>
Signed-off-by: ElizaWszola <ewszola@redhat.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 793069ae-4339-4582-aba9-f699bec8c789

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Aug 3, 2026

Copy link
Copy Markdown

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @ElizaWszola.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Aug 3, 2026
"""
Benchmark script for _dequantize Triton implementation in forward_helpers.py.

Compares Triton kernel vs PyTorch ops, both on CUDA (apples to apples).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ElizaWszola, nice work! Would it make sense to add torch.compile as a baseline as well? It can automatically generate the Triton kernels and apply the necessary operator fusion.

Signed-off-by: ElizaWszola <ewszola@redhat.com>
Signed-off-by: ElizaWszola <ewszola@redhat.com>
Signed-off-by: ElizaWszola <ewszola@redhat.com>
@mergify

mergify Bot commented Aug 6, 2026

Copy link
Copy Markdown

The quality checks have failed. Please run make style and make quality under
the root directory to adddress the lint failures. You will need to install the
dev optional install to get the required linting packages.

Signed-off-by: ElizaWszola <ewszola@redhat.com>
@mergify mergify Bot removed the quality-failed label Aug 6, 2026
Signed-off-by: ElizaWszola <ewszola@redhat.com>
Signed-off-by: ElizaWszola <ewszola@redhat.com>
@mergify

mergify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Merge Protections

🔴 1 of 1 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 Require one maintainer review 👀 reviews

🔴 Require one maintainer review

Waiting for any of

  • approved-reviews-by=HDCharles
  • approved-reviews-by=brian-dellabetta
  • approved-reviews-by=dsikka
  • approved-reviews-by=kylesayrs
This rule is failing.

All PRs must have at least one approving review from a maintainer before merging.

  • any of:
    • approved-reviews-by=HDCharles
    • approved-reviews-by=brian-dellabetta
    • approved-reviews-by=dsikka
    • approved-reviews-by=kylesayrs
  • #changes-requested-reviews-by = 0

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.

2 participants