Skip to content

Commit 5b6d224

Browse files
committed
fallback mmvq to mul_mat
1 parent cfac111 commit 5b6d224

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ggml/src/ggml-sycl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3581,7 +3581,7 @@ static void ggml_sycl_mul_mat(ggml_backend_sycl_context & ctx, const ggml_tensor
35813581

35823582
bool use_mul_mat_vec_q = ggml_is_quantized(src0->type)
35833583
&& src1->type == GGML_TYPE_F32 && dst->type == GGML_TYPE_F32
3584-
&& src1->ne[1] <= MMVQ_MAX_BATCH_SIZE;
3584+
&& src1->ne[1] <= MMVQ_MAX_BATCH_SIZE && src1->ne[1] > MMVQ_MIN_BATCH_SIZE;
35853585

35863586
bool use_mul_mat_q = ggml_sycl_supports_mmq(src0->type)
35873587
&& src1->type == GGML_TYPE_F32 && dst->type == GGML_TYPE_F32;

ggml/src/ggml-sycl/common.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ typedef sycl::float2 dfloat2;
130130
#endif // GGML_SYCL_F16
131131

132132
#define MMVQ_MAX_BATCH_SIZE 8
133+
#define MMVQ_MIN_BATCH_SIZE 4
133134

134135
static const int8_t kvalues_iq4nl[16]={-127, -104, -83, -65, -49, -35, -22, -10, 1, 13, 25, 38, 53, 69, 89, 113};
135136

0 commit comments

Comments
 (0)