Skip to content

Commit 7056c66

Browse files
committed
fix flash_attn_cm2 BLOCK_SIZE preprocessor directives
1 parent 32465b8 commit 7056c66

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm2.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void main() {
8585

8686
tensorViewNV<2, false, 1, 0> tensorViewTranspose = createTensorViewNV(2, false, 1, 0);
8787

88-
#if defined(BLOCK_SIZE)
88+
#if BLOCK_SIZE > 1
8989
tensorLayoutK = setTensorLayoutBlockSizeNV(tensorLayoutK, 1, BLOCK_SIZE);
9090
tensorLayoutV = setTensorLayoutBlockSizeNV(tensorLayoutV, 1, BLOCK_SIZE);
9191
#endif
@@ -98,7 +98,7 @@ void main() {
9898
if (Clamp != gl_CooperativeMatrixClampModeConstantNV)
9999
{
100100
q_stride &= ~7;
101-
#if !defined(BLOCK_SIZE)
101+
#if BLOCK_SIZE == 1
102102
k_stride &= ~7;
103103
v_stride &= ~7;
104104
#endif

0 commit comments

Comments
 (0)