-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[GPU] Update sdpa opt to support unaligned head size #30099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[GPU] Update sdpa opt to support unaligned head size #30099
Conversation
d07b14a
to
a54a3c3
Compare
fix qk for head size remainder
Fix sdpa func test
fixed remainder of query load
f3270db
to
1eae485
Compare
c2107d0
to
80a5123
Compare
edb323b
to
48fc974
Compare
src/plugins/intel_gpu/src/kernel_selector/cl_kernels/sdpa_opt.cl
Outdated
Show resolved
Hide resolved
e9d5c44
to
a28bd5d
Compare
src/plugins/intel_gpu/src/kernel_selector/cl_kernels/sdpa_opt.cl
Outdated
Show resolved
Hide resolved
#ifdef BEAM_TABLE_TYPE | ||
const uint b_idx = beam_table[FUNC_CALL(get_bt_index_value)(OPTIONAL_SHAPE_INFO_TENSOR b0_idx, b1_idx, 0, 0, start_partition_idx + seq_len_leftovers_start + sglid, sgid * SUBGROUP_SIZE)]; | ||
const uint value_offset = FUNC_CALL(get_input2_index)(OPTIONAL_SHAPE_INFO_TENSOR b_idx, b1_idx, 0, 0, start_partition_idx + seq_len_leftovers_start + sglid, sgid * SUBGROUP_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also handle Value input leftovers reading, as it also uses blocked read:
const INPUT2_TYPE value_packed = VALUE_BLOCK_READ(value_input, value_offset);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dummy values are just loaded and applied to acc_output_res's leftover and then just wasted. But yeah.. I will handle them for the future driver change or usage of sdpa_opt in > Xe2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/plugins/intel_gpu/src/kernel_selector/kernels/sdpa/sdpa_kernel_opt.cpp
Show resolved
Hide resolved
e9790f6
to
038cb58
Compare
Details:
Tickets: