Repository navigation
perf: optimize per-token nvfp4 quantization kernel. #3237
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
Merged
Merged
Changes from 55 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
5f13582
fix typos
IwakuraRein d61d597
WIP
IwakuraRein aed7865
WIP
IwakuraRein e94e34c
explicit amax and fp4 quant
IwakuraRein 07c284e
update core.py
IwakuraRein 1fca13e
fix quantization bug when tokens >= 1024
IwakuraRein cb1717f
fix MoERunner initializer
IwakuraRein d4ff51e
fix deduce_trtllm_gen_tensor_dtype
IwakuraRein 9011f09
use expanded_idx_to_permuted_idx in amax kernel
IwakuraRein 69fd614
add nvfp4QuantAndPerTokenScaleKernel
IwakuraRein 05e6f55
update test; fix pre-commit
IwakuraRein 7ea8538
make test smaller
IwakuraRein a41b623
fix typo
IwakuraRein 6e05cf9
perf opt
IwakuraRein ef5386e
guard expandedIdxToPermutedIdx
IwakuraRein 248162a
make sf layout as a template parameter
IwakuraRein 2b303a9
cache the local amax in smem
IwakuraRein 56f1f6a
use 256 bit vectorized load; create python binding
IwakuraRein b60d0f8
no need for inline ptx for vectorized loading
IwakuraRein bfe8d2b
update api; default per_token_scale to None; update artifacts
IwakuraRein a9b4968
kernel code clean up
IwakuraRein 9e37f75
reduce test memory usage
IwakuraRein f164ca9
Merge remote-tracking branch 'upstream/main' into per-token-fp4
IwakuraRein 884500f
update checksum
IwakuraRein 3ecaf6f
address comments
IwakuraRein 1225fdd
typo
IwakuraRein 691a6ee
add fp32 quantization kernel
IwakuraRein bbe4e17
Merge branch 'main' into per-token-fp4
IwakuraRein 5befebd
fix test_scaled_fp4_grouped_quantize
IwakuraRein c0053de
Merge branch 'main' into per-token-fp4
IwakuraRein e589c15
filter out pertoken kenrels to speedup
IwakuraRein a28051e
fix typo
IwakuraRein 311843b
fix typo
IwakuraRein 52079ea
Merge branch 'main' into per-token-fp4
IwakuraRein 39781df
include cub
IwakuraRein 5a0e111
fix compile error
IwakuraRein 17bc44e
remove cub::Max{} as Flashinfer is using cccl 3.0
IwakuraRein 8bf05fc
add usePerChannelScaling option
IwakuraRein f10fc4c
minor fix
IwakuraRein 99ad4bc
Merge branch 'main' into siyuan/per-token-fp4
zianglih 014327a
Add TE_EXACT_NVFP4 for bitwise align with TE
zianglih e0358d2
Fold api and expand test
zianglih ab993f4
Simplify te reference
zianglih 1b3ae2b
Clean up moe test
zianglih c6eb12d
Tighten tests
zianglih 40379ee
revert the cubin hash
IwakuraRein 00bd14a
Merge branch 'main' into per-token-fp4
IwakuraRein 29a783c
cache input values in smem
IwakuraRein f553c49
dont cache in smem; change block size to 128
IwakuraRein f309baf
Merge remote-tracking branch 'upstream/main' into per-token-opt
IwakuraRein fed5615
update intrinsic
IwakuraRein cdb1ed4
update intrinsic
IwakuraRein c76aa26
add launch control; revert math intrinsic
IwakuraRein f13c230
replace TE_EXACT_FP4 with environment TRTLLM_DISABLE_FP4_QUANT_FAST_MATH
IwakuraRein ee8bdd2
Merge remote-tracking branch 'upstream/main' into per-token-opt
IwakuraRein 573cc7a
automatically set env in the test
IwakuraRein 62dadb3
fix select_kernel_fp8
IwakuraRein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.