Skip to content

tune triton-fp8w8a8g64 and triton-fp8w8a8g128#1215

Merged
hiworldwzj merged 1 commit intomainfrom
wzh_tune
Mar 2, 2026
Merged

tune triton-fp8w8a8g64 and triton-fp8w8a8g128#1215
hiworldwzj merged 1 commit intomainfrom
wzh_tune

Conversation

@WANDY666
Copy link
Contributor

@WANDY666 WANDY666 commented Mar 2, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a set of new, pre-tuned kernel configurations for Triton's FP8 weight-only quantization feature. These configurations are designed to optimize the performance of scaled matrix multiplication operations on NVIDIA GeForce RTX 5090 GPUs running Triton 3.5.1, covering different activation quantization group sizes (64 and 128) and various matrix dimensions. The goal is to enhance the efficiency and speed of these specific computational workloads.

Highlights

  • Triton Kernel Tuning: New autotuned kernel configurations have been added for Triton FP8 weight-only quantization (w8a8) with activation group sizes of 64 and 128.
  • GPU Specific Optimizations: The added configurations are specifically tailored for the NVIDIA GeForce RTX 5090 GPU and Triton version 3.5.1, targeting improved performance for scaled matrix multiplication operations.
  • Configuration Parameters: Each new configuration file specifies optimal BLOCK_K, BLOCK_M, BLOCK_N, GROUP_M, num_stages, and num_warps for various input dimensions (K, N) and act_quant_group_size values.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=14336,N=5120,act_quant_group_size=128}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=14336, N=5120, and act_quant_group_size=128.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=14336,N=5120,act_quant_group_size=64}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=14336, N=5120, and act_quant_group_size=64.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=4096,N=5120,act_quant_group_size=128}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=4096, N=5120, and act_quant_group_size=128.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=4096,N=5120,act_quant_group_size=64}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=4096, N=5120, and act_quant_group_size=64.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=5120,N=2048,act_quant_group_size=128}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=5120, N=2048, and act_quant_group_size=128.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=5120,N=2048,act_quant_group_size=64}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=5120, N=2048, and act_quant_group_size=64.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=5120,N=28672,act_quant_group_size=128}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=5120, N=28672, and act_quant_group_size=128.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=5120,N=28672,act_quant_group_size=64}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=5120, N=28672, and act_quant_group_size=64.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=5120,N=4096,act_quant_group_size=128}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=5120, N=4096, and act_quant_group_size=128.
  • lightllm/common/triton_utils/autotune_kernel_configs/triton_3.5.1/NVIDIA_GeForce_RTX_5090/scaled_mm_act_per_group_w_perchannel:v1/{K=5120,N=4096,act_quant_group_size=64}_NVIDIA_GeForce_RTX_5090.json
    • Added new autotuned kernel configurations for K=5120, N=4096, and act_quant_group_size=64.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds autotuned Triton kernel configurations for triton-fp8w8a8g64 and triton-fp8w8a8g128 on NVIDIA GeForce RTX 5090 GPUs. The changes consist of several new JSON configuration files. My review focuses on the format and maintainability of these files. I've suggested sorting the keys in the JSON files numerically to improve readability. This change should be applied to all new configuration files.

Comment on lines +1 to +74
{
"1": {
"BLOCK_K": 128,
"BLOCK_M": 8,
"BLOCK_N": 64,
"GROUP_M": 8,
"num_stages": 3,
"num_warps": 4
},
"100": {
"BLOCK_K": 64,
"BLOCK_M": 32,
"BLOCK_N": 128,
"GROUP_M": 8,
"num_stages": 3,
"num_warps": 8
},
"1024": {
"BLOCK_K": 128,
"BLOCK_M": 64,
"BLOCK_N": 128,
"GROUP_M": 8,
"num_stages": 3,
"num_warps": 4
},
"128": {
"BLOCK_K": 128,
"BLOCK_M": 64,
"BLOCK_N": 64,
"GROUP_M": 8,
"num_stages": 3,
"num_warps": 4
},
"16": {
"BLOCK_K": 128,
"BLOCK_M": 16,
"BLOCK_N": 64,
"GROUP_M": 8,
"num_stages": 3,
"num_warps": 4
},
"256": {
"BLOCK_K": 128,
"BLOCK_M": 64,
"BLOCK_N": 128,
"GROUP_M": 8,
"num_stages": 3,
"num_warps": 8
},
"32": {
"BLOCK_K": 128,
"BLOCK_M": 16,
"BLOCK_N": 64,
"GROUP_M": 8,
"num_stages": 4,
"num_warps": 4
},
"64": {
"BLOCK_K": 128,
"BLOCK_M": 32,
"BLOCK_N": 64,
"GROUP_M": 8,
"num_stages": 4,
"num_warps": 8
},
"8": {
"BLOCK_K": 128,
"BLOCK_M": 8,
"BLOCK_N": 64,
"GROUP_M": 8,
"num_stages": 4,
"num_warps": 4
}
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The keys in this JSON file are sorted alphabetically as strings (e.g., "1", "100", "1024", "128", ...), which makes it difficult to read and find configurations for a specific M value. For better readability and maintainability, please sort the keys numerically. This comment applies to all new JSON configuration files in this pull request.

{
  "1": {
    "BLOCK_K": 128,
    "BLOCK_M": 8,
    "BLOCK_N": 64,
    "GROUP_M": 8,
    "num_stages": 3,
    "num_warps": 4
  },
  "8": {
    "BLOCK_K": 128,
    "BLOCK_M": 8,
    "BLOCK_N": 64,
    "GROUP_M": 8,
    "num_stages": 4,
    "num_warps": 4
  },
  "16": {
    "BLOCK_K": 128,
    "BLOCK_M": 16,
    "BLOCK_N": 64,
    "GROUP_M": 8,
    "num_stages": 3,
    "num_warps": 4
  },
  "32": {
    "BLOCK_K": 128,
    "BLOCK_M": 16,
    "BLOCK_N": 64,
    "GROUP_M": 8,
    "num_stages": 4,
    "num_warps": 4
  },
  "64": {
    "BLOCK_K": 128,
    "BLOCK_M": 32,
    "BLOCK_N": 64,
    "GROUP_M": 8,
    "num_stages": 4,
    "num_warps": 8
  },
  "100": {
    "BLOCK_K": 64,
    "BLOCK_M": 32,
    "BLOCK_N": 128,
    "GROUP_M": 8,
    "num_stages": 3,
    "num_warps": 8
  },
  "128": {
    "BLOCK_K": 128,
    "BLOCK_M": 64,
    "BLOCK_N": 64,
    "GROUP_M": 8,
    "num_stages": 3,
    "num_warps": 4
  },
  "256": {
    "BLOCK_K": 128,
    "BLOCK_M": 64,
    "BLOCK_N": 128,
    "GROUP_M": 8,
    "num_stages": 3,
    "num_warps": 8
  },
  "1024": {
    "BLOCK_K": 128,
    "BLOCK_M": 64,
    "BLOCK_N": 128,
    "GROUP_M": 8,
    "num_stages": 3,
    "num_warps": 4
  }
}

@hiworldwzj hiworldwzj merged commit ef57a56 into main Mar 2, 2026
1 check passed
@hiworldwzj hiworldwzj deleted the wzh_tune branch March 2, 2026 05:22
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