-
Notifications
You must be signed in to change notification settings - Fork 487
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
Add ops w/ default implementation for QTensorOps
#2125
Merged
Merged
Conversation
This file contains 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
laggui
changed the title
Add ops default implementation for
Add ops w/ default implementation for Aug 7, 2024
QTensorOps
QTensorOps
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2125 +/- ##
==========================================
+ Coverage 85.57% 85.83% +0.25%
==========================================
Files 707 750 +43
Lines 89097 94420 +5323
==========================================
+ Hits 76249 81048 +4799
- Misses 12848 13372 +524 ☔ View full report in Codecov by Sentry. |
This PR has been marked as stale because it has not been updated for over a month |
laggui
force-pushed
the
feat/quant/default-ops
branch
from
September 9, 2024 15:53
3796c4b
to
bbb5ece
Compare
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.
Checklist
run-checks all
script has been executed.Related Issues/PRs
Follow-up to #2025
Changes
q_*
ops inQTensorOps
with some default implementationsFloat
vsQFloat
) to call the corresponding opsquantize_dynamic
which computes the quantization parameters at runtimetestgen_quantization
test macro to use with backends that support quantizationsort_with_indices
op to tch backendchunk
to call the corresponding backend methods (previously always ran the default implementation regardless of backend implementation)Testing
Added unit tests for all ops.
Note: the tests try to use tensors with floating point values which can be de/quantized without introducing too much quantization error, but the result always depends on the operation (e.g., tensor product of values can grow larger and significantly increase the output tensor range, leading to more de/quantization error on the results).