vulkan: Fix data race/hang in scalar/cm1 flash attention (llama/17887)

This commit is contained in:
Jeff Bolz 2025-12-14 02:00:00 -06:00 committed by Georgi Gerganov
parent 7e5df2975e
commit af2c8cba6f
2 changed files with 6 additions and 0 deletions

View File

@ -256,6 +256,9 @@ void main() {
barrier();
}
// prevent race on tmpsh
barrier();
// reduce across threads
[[unroll]] for (uint32_t r = 0; r < Br; ++r) {

View File

@ -302,6 +302,9 @@ void main() {
barrier();
}
// prevent race on tmpsh
barrier();
// reduce across threads
float rowmaxf[rows_per_thread], eMf[rows_per_thread], Moldf[rows_per_thread];