[ET-VK][Ops] dequantize ops skeleton test framework#11675
Closed
pytorchbot wants to merge 2 commits into
Closed
Conversation
Pull Request resolved: #11480 # Context In this diff we plan on creating the skeleton test framework for dequantization. This is necessary as we need a reference to test our vulkan implementation of the dequantization operator against an existing cpu implementation. This test framework is heavily inspired by [sdpa_test.cpp](https://github.com/pytorch/executorch/blob/main/backends/vulkan/test/op_tests/sdpa_test.cpp). We make use of the [op_dequantize.cpp](https://github.com/pytorch/executorch/blob/main/kernels/quantized/cpu/op_dequantize.cpp) cpu implementation of the `dequantize_per_tensor`, and the `dequantize_per_token` operators. An explanation for the operator is included where the actual vulkan implementation is created in a future diff along this stack. # Changes The main thing in this difference is the creation of a new test framework `dequantize_test.cpp`, and also including it in targets.bzl such that we can properly call the test. As this is inspired by sdpa_test.cpp, we also follow a similar format. First we have forward declarations of the functions that we wish to test against (dequantize_per_tensor, and dequantize_per_token). Then we also have wrappers for the functions without context, and finally wrappers for the ATen implementations of the same operators using the `WRAP_TO_ATEN` macro. We don't need context as this is merely for testing. We also have a utility function to test the quantize arguments that will be used when actually using the vulkan implementation. This utility function is just for a sanity check. ghstack-source-id: 290376489 @exported-using-ghexport Differential Revision: [D76267021](https://our.internmc.facebook.com/intern/diff/D76267021/)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11675
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 3 Unrelated FailuresAs of commit 9d8f8b6 with merge base 56392aa ( NEW FAILURE - The following job has failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ahmtox
approved these changes
Jun 14, 2025
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 PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #11480 by @ahmtox
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/ahmtox/13/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/ahmtox/13/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/ahmtox/10/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/ahmtox/13/orig
@diff-train-skip-merge