Skip to content

Commit 383d470

Browse files
authored
fix error in kernel (#29587)
### Details: - adding missing macro definition - backport of #29561 ### Tickets: - 164533 --------- Signed-off-by: fishbell <bell.song@intel.com>
1 parent 7219aa8 commit 383d470

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/plugins/intel_gpu/src/kernel_selector/cl_kernels/quantize_gpu_scale_shift_vload8_opt.cl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#define convert_float8_sat convert_float8
1919
#define convert_half8_sat convert_half8
2020

21+
#define vload1(OFFSET, PTR) (*((PTR) + (OFFSET)))
22+
#define vstore1(TENSOR, OFFSET, PTR) (*((PTR) + (OFFSET)) = (TENSOR))
23+
2124
#define vstore_partial_1(TENSOR, OFFSET, PTR) vstore1(TENSOR.s0, OFFSET, PTR);
2225
#define vstore_partial_2(TENSOR, OFFSET, PTR) vstore2(TENSOR.s01, OFFSET, PTR);
2326
#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
172175
#else
173176
VSTORE_PARTIAL(8)(res, global_id, output);
174177
#endif
175-
}
178+
}

src/plugins/intel_gpu/tests/unit/test_cases/quantize_gpu_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,8 @@ struct quantize_random_test : testing::TestWithParam<quantize_random_test_params
948948
size_t f = output_lay.feature();
949949
size_t x = output_lay.spatial(0);
950950
size_t y = output_lay.spatial(1);
951-
mem_lock<T> ref_ptr{out_ref, get_test_stream()};
952-
mem_lock<T> opt_ptr{out_opt, get_test_stream()};
951+
mem_lock<T, mem_lock_type::read> ref_ptr{out_ref, get_test_stream()};
952+
mem_lock<T, mem_lock_type::read> opt_ptr{out_opt, get_test_stream()};
953953
for (size_t bi = 0; bi < b; ++bi) {
954954
for (size_t fi = 0; fi < f; ++fi) {
955955
for (size_t yi = 0; yi < y; ++yi) {
@@ -1080,6 +1080,8 @@ struct quantize_random_test_param_generator : std::vector<quantize_random_test_p
10801080
push_back(quantize_random_test_params{ input_type, output_type, {64, 32, 10, 10}, input_format, output_format, inputs_num});
10811081
push_back(quantize_random_test_params{ input_type, output_type, {1, 17, 10, 10}, input_format, output_format, inputs_num});
10821082
push_back(quantize_random_test_params{ input_type, output_type, {17, 17, 10, 10}, input_format, output_format, inputs_num});
1083+
push_back(quantize_random_test_params{ input_type, output_type, {1, 1, 1029, 85}, input_format, output_format, inputs_num});
1084+
push_back(quantize_random_test_params{ input_type, output_type, {1, 1, 81, 5}, input_format, output_format, inputs_num});
10831085
return *this;
10841086
}
10851087
};

0 commit comments

Comments
 (0)