Support fake-quantized linear with fp32 bias#154
Merged
mhs4670go merged 1 commit intoSamsung:mainfrom Jun 18, 2025
Merged
Conversation
jinevening
commented
Jun 17, 2025
| return (torch.randn(3, 3), None) | ||
|
|
||
|
|
||
| @test_without_inference |
Contributor
Author
There was a problem hiding this comment.
I added this tag. A test with this tag stops before inference.
jinevening
commented
Jun 17, 2025
|
|
||
| # TODO Support more ops. | ||
|
|
||
| graph.eliminate_dead_code() |
Contributor
Author
There was a problem hiding this comment.
TODO We need to eliminate lifted constant tensor placeholder.
This supports fake-quantized linear with fp32 bias. TICO-DCO-1.0-Signed-off-by: Hyukjin Jeong <hj1.jeong@samsung.com>
e87b415 to
d9c147c
Compare
dayo09
reviewed
Jun 17, 2025
Comment on lines
+68
to
+69
| if bias_val.dtype != torch.float32: | ||
| continue |
Contributor
There was a problem hiding this comment.
I just wonder if this bias quantization is not required for torch.float64 case?.
Contributor
Author
There was a problem hiding this comment.
I've not seen fp64 bias so far. Most quantization frameworks use fp32 by default and partially support fp16. It would be possible to support another type when necessary.
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.
This supports fake-quantized linear with fp32 bias.
TICO-DCO-1.0-Signed-off-by: Hyukjin Jeong hj1.jeong@samsung.com
Related to: #149, #165