Skip to content

Commit 0adac7a

Browse files
author
morelos
committed
Update base for Update on "[ET-VK][Ops] dequantize_per_channel shaders and impl"
# Context We need to enable the core logic for dequantize_per_channel in the vulkan shader. This implements the shader itself and its cpp header. TODO: add more of a description regarding the operator # Changes This creates an extension of the existing files for dequantize_per_channel. Differential Revision: [D77746141](https://our.internmc.facebook.com/intern/diff/D77746141/) [ghstack-poisoned]
1 parent 59895c9 commit 0adac7a

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

backends/vulkan/test/op_tests/dequantize_test.cpp

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -557,18 +557,6 @@ void test_vulkan_dequantize_per_token_impl(
557557
const vkcompute::utils::StorageType in_storage,
558558
const vkcompute::utils::StorageType out_storage);
559559

560-
void test_vulkan_dequantize_per_channel_impl(
561-
const std::vector<int>& input_sizes,
562-
const std::vector<float>& scales,
563-
const std::vector<int>& zero_points,
564-
int64_t axis,
565-
int64_t quant_min,
566-
int64_t quant_max,
567-
at::ScalarType dtype,
568-
at::ScalarType out_dtype,
569-
const vkcompute::utils::StorageType in_storage,
570-
const vkcompute::utils::StorageType out_storage);
571-
572560
// Wrapper function to test both buffer and texture storage types
573561
void test_vulkan_dequantize_per_tensor(
574562
const std::vector<int>& input_sizes,
@@ -649,49 +637,6 @@ void test_vulkan_dequantize_per_token(
649637
vkcompute::utils::kTexture3D);
650638
}
651639

652-
// Wrapper function to test both buffer and texture storage types
653-
void test_vulkan_dequantize_per_channel(
654-
const std::vector<int>& input_sizes,
655-
const std::vector<float>& scales,
656-
const std::vector<int>& zero_points,
657-
int64_t axis,
658-
int64_t quant_min,
659-
int64_t quant_max,
660-
at::ScalarType dtype,
661-
at::ScalarType out_dtype) {
662-
// Test with buffer storage
663-
test_vulkan_dequantize_per_channel_impl(
664-
input_sizes,
665-
scales,
666-
zero_points,
667-
axis,
668-
quant_min,
669-
quant_max,
670-
dtype,
671-
out_dtype,
672-
vkcompute::utils::kBuffer,
673-
vkcompute::utils::kBuffer);
674-
675-
// Telling the system to expect a float instead of a double
676-
// since the shader can only return 32bit anyways
677-
if (out_dtype == at::kDouble) {
678-
out_dtype = at::kFloat;
679-
}
680-
681-
// Test with texture storage
682-
test_vulkan_dequantize_per_channel_impl(
683-
input_sizes,
684-
scales,
685-
zero_points,
686-
axis,
687-
quant_min,
688-
quant_max,
689-
dtype,
690-
out_dtype,
691-
vkcompute::utils::kTexture3D,
692-
vkcompute::utils::kTexture3D);
693-
}
694-
695640
void test_reference_dequantize_per_tensor(
696641
const std::vector<int>& input_sizes,
697642
float scale,

0 commit comments

Comments
 (0)