Skip to content

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

[GPU] Fix gha ci dgpu test failures (#36529)

Xiong Yuane8ab30f96eda
diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp
index 875c6ee6383..826f8924100 100644
--- a/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp
+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp
@@ -64,6 +64,10 @@ struct dynamic_quantize_impl : typed_primitive_impl_ocl<dynamic_quantize> {
}
void update_dispatch_data(const kernel_impl_params& impl_param) override {
+ if (impl_param.can_be_optimized()) {
+ return;
+ }
+
auto kernel_params = get_kernel_params(impl_param, true);
(_kernel_data.update_dispatch_data_func)(kernel_params, _kernel_data);
}
diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_opt.cl b/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_opt.cl
index e557040ef99..5891268d39c 100644
--- a/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_opt.cl
+++ b/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_opt.cl
@@ -1154,6 +1154,19 @@ inline SEQ_RANGE FUNC(calc_sliding_window_seq_range)(const SEQ_RANGE default_seq
int found_block_range_end = default_block_range_end;
int found_block_range_begin = default_block_range_begin;
+ // Full-range fallback for lanes that do not correspond to a real target row.
+ // Do not return on lane-local conditions before the cooperative searches below,
+ // because the helpers use work-group barriers.
+ SEQ_RANGE fallback_range;
+ fallback_range.min = 0;
+ fallback_range.max = seq_len > 0 ? seq_len - 1 : 0;
+ fallback_range.subgroup_max = min(default_block_range_end, seq_len);
+
+ // These conditions are block-uniform and protect the barrier-free reads below.
+ if (default_block_range_end <= 0 || default_block_range_end > seq_len || default_block_range_begin >= seq_len) {
+ return fallback_range;
+ }
+
// block cooperative search for token group end
if (token_type_ids[default_block_range_end - 1] == 1) {
found_block_range_end = FUNC_CALL(find_first_zero_to_the_right_wg)(token_type_ids, reduction_buffer, default_block_range_end, seq_len);
@@ -1167,6 +1180,11 @@ inline SEQ_RANGE FUNC(calc_sliding_window_seq_range)(const SEQ_RANGE default_seq
int token_group_end = default_seq_range.max;
int token_group_begin = default_seq_range.max;
+ // Lane-local fallback is only safe after all cooperative searches complete.
+ if (token_group_end >= seq_len) {
+ return fallback_range;
+ }
+
// Special case: image group is less than subgroup size.
if (token_type_ids[token_group_end] == 1) {
int new_group_end = token_group_end + 1;