Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ggml/src/ggml-vulkan/vulkan-shaders/flash_attn.comp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ void main() {
barrier();
}

// prevent race on tmpsh
barrier();

// reduce across threads

[[unroll]] for (uint32_t r = 0; r < Br; ++r) {
Expand Down
3 changes: 3 additions & 0 deletions ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm1.comp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down