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

This commit is contained in:
Jeff Bolz
2025-12-18 08:20:56 +02:00
committed by Georgi Gerganov
parent 7e5df2975e
commit af2c8cba6f
2 changed files with 6 additions and 0 deletions
@@ -256,6 +256,9 @@ void main() {
barrier();
}
// prevent race on tmpsh
barrier();
// reduce across threads
[[unroll]] for (uint32_t r = 0; r < Br; ++r) {
@@ -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];