Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

fix missing macro defs in kernel (#29561)

yanlan song6bbc17443c04
diff --git a/src/plugins/intel_gpu/src/kernel_selector/cl_kernels/quantize_gpu_scale_shift_vload8_opt.cl b/src/plugins/intel_gpu/src/kernel_selector/cl_kernels/quantize_gpu_scale_shift_vload8_opt.cl
index b67514a522e..7cf0bcc0cea 100644
--- a/src/plugins/intel_gpu/src/kernel_selector/cl_kernels/quantize_gpu_scale_shift_vload8_opt.cl
+++ b/src/plugins/intel_gpu/src/kernel_selector/cl_kernels/quantize_gpu_scale_shift_vload8_opt.cl
@@ -18,6 +18,9 @@
#define convert_float8_sat convert_float8
#define convert_half8_sat convert_half8
+#define vload1(OFFSET, PTR) (*((PTR) + (OFFSET)))
+#define vstore1(TENSOR, OFFSET, PTR) (*((PTR) + (OFFSET)) = (TENSOR))
+
#define vstore_partial_1(TENSOR, OFFSET, PTR) vstore1(TENSOR.s0, OFFSET, PTR);
#define vstore_partial_2(TENSOR, OFFSET, PTR) vstore2(TENSOR.s01, OFFSET, PTR);
#define vstore_partial_3(TENSOR, OFFSET, PTR) vstore3(TENSOR.s012, OFFSET, PTR);
@@ -172,4 +175,4 @@ KERNEL(quantize_gpu_scale_shift_vload8_opt)(OPTIONAL_SHAPE_INFO_ARG
#else
VSTORE_PARTIAL(8)(res, global_id, output);
#endif
-}
\ No newline at end of file
+}
diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/quantize_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/quantize_gpu_test.cpp
index 23746748cac..080d03bf9df 100644
--- a/src/plugins/intel_gpu/tests/unit/test_cases/quantize_gpu_test.cpp
+++ b/src/plugins/intel_gpu/tests/unit/test_cases/quantize_gpu_test.cpp
@@ -948,8 +948,8 @@ struct quantize_random_test : testing::TestWithParam<quantize_random_test_params
size_t f = output_lay.feature();
size_t x = output_lay.spatial(0);
size_t y = output_lay.spatial(1);
- mem_lock<T> ref_ptr{out_ref, get_test_stream()};
- mem_lock<T> opt_ptr{out_opt, get_test_stream()};
+ mem_lock<T, mem_lock_type::read> ref_ptr{out_ref, get_test_stream()};
+ mem_lock<T, mem_lock_type::read> opt_ptr{out_opt, get_test_stream()};
for (size_t bi = 0; bi < b; ++bi) {
for (size_t fi = 0; fi < f; ++fi) {
for (size_t yi = 0; yi < y; ++yi) {
@@ -1080,6 +1080,8 @@ struct quantize_random_test_param_generator : std::vector<quantize_random_test_p
push_back(quantize_random_test_params{ input_type, output_type, {64, 32, 10, 10}, input_format, output_format, inputs_num});
push_back(quantize_random_test_params{ input_type, output_type, {1, 17, 10, 10}, input_format, output_format, inputs_num});
push_back(quantize_random_test_params{ input_type, output_type, {17, 17, 10, 10}, input_format, output_format, inputs_num});
+ push_back(quantize_random_test_params{ input_type, output_type, {1, 1, 1029, 85}, input_format, output_format, inputs_num});
+ push_back(quantize_random_test_params{ input_type, output_type, {1, 1, 81, 5}, input_format, output_format, inputs_num});
return *this;
}
};