@@ -5108,10 +5108,10 @@ static void ggml_compute_forward_soft_max_f32(
51085108 const float m1 = powf (2 .0f , -(max_bias / 2 .0f ) / n_head_log2);
51095109
51105110 // SparseK parameters (from op_params)
5111- const bool use_sparsek = ggml_get_op_params_i32 (dst, 30 ) != 0 ;
5112- const int32_t k_top = ggml_get_op_params_i32 (dst, 31 );
5113- const int32_t win_local = ggml_get_op_params_i32 (dst, 32 );
5114- const int32_t stride_glb = ggml_get_op_params_i32 (dst, 33 );
5111+ const bool use_sparsek = ggml_get_op_params_i32 (dst, 3 ) != 0 ;
5112+ const int32_t k_top = ggml_get_op_params_i32 (dst, 4 );
5113+ const int32_t win_local = ggml_get_op_params_i32 (dst, 5 );
5114+ const int32_t stride_glb = ggml_get_op_params_i32 (dst, 6 );
51155115 (void )use_sparsek; (void )k_top; (void )win_local; (void )stride_glb;
51165116
51175117
@@ -5131,8 +5131,9 @@ static void ggml_compute_forward_soft_max_f32(
51315131
51325132 // ALiBi
51335133 const uint32_t h = i02; // head
5134- const float slope = (max_bias > 0 .0f ) ? h < n_head_log2 ? powf (m0, h + 1 ) : powf (m1, 2 *(h - n_head_log2) + 1 ) : 1 .0f ;
5135-
5134+ const float slope = (max_bias > 0 .0f )
5135+ ? (h < n_head_log2 ? powf (m0, h + 1 ) : powf (m1, 2 *(h - n_head_log2) + 1 ))
5136+ : 1 .0f ;
51365137 float * sp = (float *)((char *) src0->data + i01*nb01 + i02*nb02 + i03*nb03);
51375138 float * dp = (float *)((char *) dst->data + i01*nb1 + i02*nb2 + i03*nb3);
51385139
@@ -8002,11 +8003,11 @@ static void ggml_compute_forward_flash_attn_ext_f16_one_chunk(
80028003 const float m0 = powf (2 .0f , -(max_bias ) / n_head_log2);
80038004 const float m1 = powf (2 .0f , -(max_bias / 2 .0f ) / n_head_log2);
80048005
8005- // -------- SparseK op_params (לא משנה שום דבר חוץ מקריאת הפרמטרים) --------
8006- const bool use_sparsek = ggml_get_op_params_i32 (dst, 28 ) != 0 ;
8007- const int32_t k_top = ggml_get_op_params_i32 (dst, 29 );
8008- const int32_t win_local = ggml_get_op_params_i32 (dst, 30 );
8009- const int32_t stride_glb = ggml_get_op_params_i32 (dst, 31 );
8006+ // -------- SparseK op_params --------
8007+ const bool use_sparsek = ggml_get_op_params_i32 (dst, 3 ) != 0 ;
8008+ const int32_t k_top = ggml_get_op_params_i32 (dst, 4 );
8009+ const int32_t win_local = ggml_get_op_params_i32 (dst, 5 );
8010+ const int32_t stride_glb = ggml_get_op_params_i32 (dst, 6 );
80108011 // ----------------------------------------------------------------------------
80118012
80128013 ggml_type const k_vec_dot_type = ggml_get_type_traits_cpu (k->type )->vec_dot_type ;
0 commit comments