-
Notifications
You must be signed in to change notification settings - Fork 653
[Common] Persistent Grouped MXFP8 quantization kernel #2738
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
Open
Oleg-Goncharov
wants to merge
27
commits into
NVIDIA:main
Choose a base branch
from
Oleg-Goncharov:pr_persistent_grouped_mxfp8_kernel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+936
−548
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
c7c1a76
Implemented the kernel with split dbias
Oleg-Goncharov 7abbc7b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f820b21
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0c05632
Relaxed constraints on the last dimension
Oleg-Goncharov 4a85dea
Added notes on group tensor restrictions into documentation
Oleg-Goncharov aedd53d
Fixes per the review
Oleg-Goncharov 38288b1
Fixed pointer
Oleg-Goncharov ce3a137
More fixes
Oleg-Goncharov bddd804
Fixed kernel grid size
Oleg-Goncharov a894d1a
Merge branch 'main' into pr_split_dbias
Oleg-Goncharov 87352bd
Enabled persistency with WorkID Query feature
Oleg-Goncharov e23f553
Added a struct with tunable parameters
Oleg-Goncharov d185299
Added persistency with static scheduling
Oleg-Goncharov 5e15f57
Fixed test cases
Oleg-Goncharov 98e9558
Ready for benchmarking
Oleg-Goncharov ab816cb
Fixed out-of-boundary error
Oleg-Goncharov 8a429ad
Tuned kernel parameters
Oleg-Goncharov ab3f911
Refactoring
Oleg-Goncharov 92720ac
Refactoring 2
Oleg-Goncharov 46d9811
Refactoring 3
Oleg-Goncharov 7172400
Removed the dynamic (WorkID Query) persistency
Oleg-Goncharov 4344627
Ready for PR
Oleg-Goncharov ede33b4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 219e925
Merge branch 'main' into pr_persistent_grouped_mxfp8_kernel
Oleg-Goncharov 325181b
Fixes per the review
Oleg-Goncharov 04609b1
Merge branch 'main' into pr_persistent_grouped_mxfp8_kernel
Oleg-Goncharov 5815335
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output stride assumes uniform cols across all tensors
The output write offset is computed as:
OType *const thread_out_base = dbias_output + tensor_id * cols + thread_id * nvec;where
colsislast_logical_dim— a single value shared across all tensors in the group. This is correct forSAME_BOTH_DIMSandVARYING_FIRST_DIM(where all tensors share the same last dimension), but the kernel receivesshape_repas a parameter and does not enforce that restriction.For
VARYING_LAST_DIMorVARYING_BOTH_DIMSwhere per-tensor cols differ, the fixedtensor_id * colsstride would compute wrong output offsets. Currently, tests skip dbias validation for these cases, but the kernel would produce incorrect results if actually called with varying-last-dim tensors.Consider adding a device-side assertion to enforce the precondition: