[quant][core][gpu][improvement] Removed linear_output and set output tensors as virtual in quantized cudnn linear op#77518
Closed
dzdang wants to merge 1 commit intogh/dzdang/116/basefrom
Closed
[quant][core][gpu][improvement] Removed linear_output and set output tensors as virtual in quantized cudnn linear op#77518dzdang wants to merge 1 commit intogh/dzdang/116/basefrom
dzdang wants to merge 1 commit intogh/dzdang/116/basefrom
Conversation
…tensors as virtual in quantized cudnn linear op Summary: See #76787. Same idea applied here but for `linear_output`. Test plan: ``` python test/test_quantization.py --k test_qlinear_cudnn ``` [ghstack-poisoned]
Contributor
🔗 Helpful links
❌ 1 New FailuresAs of commit 55166af (more details on the Dr. CI page): Expand to see more
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages
|
Contributor
Author
|
@dzdang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
jerryzh168
reviewed
May 24, 2022
| .setxDesc(tensor2requant_ptr) | ||
| .setyDesc(cudnn_utils::getTensorDescriptor(linear_output, 'f', key.output_alignment, true)) | ||
| .setpwDesc(cudnn_utils::getPointWiseReluDescriptor(at::native::getCudnnDataType(linear_output))) | ||
| // for virtual tensors, the alignment is not used, so we can just put an arbitrary value here, e.g., key.output_alignment |
Contributor
There was a problem hiding this comment.
should we just use -1 or something to indicate that it is not used?
jerryzh168
reviewed
May 24, 2022
| .setbMatDesc(cudnn_utils::getTensorDescriptor(weight_transposed.sizes(), weight_transposed.strides(), CUDNN_DATA_INT8, 'w', key.weight_alignment)) | ||
| .setcMatDesc(cudnn_utils::getTensorDescriptor(linear_output, 'y', key.output_alignment, true)) | ||
| // for virtual tensors, the alignment is not used, so we can just put an arbitrary value here, e.g., key.output_alignment | ||
| .setcMatDesc(cudnn_utils::getTensorDescriptor(quantized_output.sizes(), quantized_output.strides(), CUDNN_DATA_FLOAT, 'y', key.output_alignment, true)) |
Contributor
There was a problem hiding this comment.
similar for the output_alignment here, should we just use -1 to indicate that it is not used?
jerryzh168
approved these changes
May 24, 2022
Contributor
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
facebook-github-bot
pushed a commit
that referenced
this pull request
May 25, 2022
…tensors as virtual in quantized cudnn linear op (#77518) Summary: Pull Request resolved: #77518 See #76787. Same idea applied here but for `linear_output`. Test Plan: ``` python test/test_quantization.py --k test_qlinear_cudnn ``` Reviewed By: jerryzh168 Differential Revision: D36403832 Pulled By: dzdang fbshipit-source-id: 4ec3bab6a9d82a58fecd38bc943b2137a4f4157e
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.
Stack from ghstack (oldest at bottom):
Summary:
See #76787. Same idea applied
here but for
linear_output.Test plan:
Differential Revision: D36403832