[jit kernel] support dtype as a cpp template parameter#16452
Merged
BBuf merged 8 commits intosgl-project:mainfrom Jan 8, 2026
Merged
[jit kernel] support dtype as a cpp template parameter#16452BBuf merged 8 commits intosgl-project:mainfrom
BBuf merged 8 commits intosgl-project:mainfrom
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
52ea13b to
decdb03
Compare
BBuf
reviewed
Jan 5, 2026
BBuf
reviewed
Jan 5, 2026
Collaborator
Author
|
/tag-run-ci-label |
Collaborator
|
/tag-and-rerun-ci |
Collaborator
|
/rerun-failed-ci |
DarkSharpness
approved these changes
Jan 6, 2026
BBuf
approved these changes
Jan 7, 2026
Collaborator
|
/rerun-failed-ci |
yhyang201
approved these changes
Jan 7, 2026
hnyls2002
pushed a commit
that referenced
this pull request
Jan 8, 2026
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.
Motivation
In the current jit kernel implementation,
dtypecan not be passed as a cpp template parameters, which in some cases leads to larger binary size and longer compilation time. For example, when a kernel supports multiple dtype we have to generate separate kernels for each dtype instead of generating a single templated kernel.This PR support dtype as a cpp template parameter.
Modifications
This PR modify
make_cpp_argsto deal with dtype template parameters. Then optimize thenormkernel to validate this modification.Accuracy Tests
run test_qknorm and passed.
Benchmarking and Profiling
None.
Checklist
None.
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci) or contact authorized users to do so.