-
Notifications
You must be signed in to change notification settings - Fork 501
[PyTorch] Debug linear layer when saving original input and using debug quantizer #1963
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 all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
867ab1c
Debug linear layer when saving original input and using debug quantizer
timmoon10 6f66aa4
Workaround bugs with quantizing with only column-wise usage
timmoon10 7c20075
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 212a446
Remove unused imports
timmoon10 d83014d
Merge branch 'main' into debug-linear-original-input
timmoon10 62d5c38
Avoid unnecessary row-wise data
timmoon10 6cc7cac
Merge branch 'main' into debug-linear-original-input
timmoon10 d9c7dd1
Workaround bugs with quantizing with only column-wise usage
timmoon10 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
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.
Hi Tim, why do we need the rowwise data here?
Uh oh!
There was an error while loading. Please reload this page.
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.
In principle we shouldn't need it, but I was running into issues where FP8 casts were failing without it.
Actually, I don't think we need it once we skip the debug quantizer case.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.
I think this may be due to that the condition is modified. For
(Float8Quantizer, Float8CurrentScalingQuantizer)
cases, it doesn't support only quantizing the colwise data. But ifbackward_input_needs_gather
is False,(Float8Quantizer, Float8CurrentScalingQuantizer)
tensors would also go into theelse
path, which will cause the error. This hurts the performance of blockwise FP8 and MXFP8. Do you need me to create a fix PR for this, or will you fix this together with the DebugTensor?