Adding support for bias addition + rescaling with token weights to grouped_gemm#5280
Open
metastableB wants to merge 1 commit intopytorch:mainfrom
Open
Adding support for bias addition + rescaling with token weights to grouped_gemm#5280metastableB wants to merge 1 commit intopytorch:mainfrom
metastableB wants to merge 1 commit intopytorch:mainfrom
Conversation
…ouped_gemm Summary: Adds support for providing bias and token weights as optional arguments to fbgemm's triton grouped gemm. The changes were added to the `_grouped_gemm` protected kernel implementation, and exposed through a new public function `grouped_gemm_bias_scale` --- the original `grouped_gemm` signature remains untouched. For internal testing use, ``` buck test -c fbcode.nvcc_arch=h100a -c fbcode.enable_gpu_sections=true fbcode//deeplearning/fbgemm/fbgemm_gpu/experimental/gemm/test:grouped_gemm_test -- test_grouped_gemm_bias_scale ``` For basic benchmarking on H100 nodes use, ``` buck run -c fbcode.nvcc_arch=h100a -c fbcode.enable_gpu_sections=true fbcode//deeplearning/fbgemm/fbgemm_gpu/experimental/gemm/test:grouped_gemm_bias_scale_benchmark 2>/dev/null ``` ``` Benchmark Results: Config fused (ms) triton+torch (ms) torch (ms) Speedup vs torch Speedup vs triton+torch Small 0.009 0.017 0.027 3.03x 1.91x Medium 0.017 0.036 0.049 2.82x 2.04x Large 0.048 0.091 0.142 2.97x 1.91x ``` Differential Revision: D89699751
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Adds support for providing bias and token weights as optional arguments to fbgemm's triton grouped gemm. The changes were added to the
_grouped_gemmprotected kernel implementation, and exposed through a new public functiongrouped_gemm_bias_scale--- the originalgrouped_gemmsignature remains untouched.For internal testing use,
For basic benchmarking on H100 nodes use,
Differential Revision: D89699751