Skip to content

Commit b29328a

Browse files
committed
opencl: skip some kernels not used by Adreno on old compilers
1 parent 5fb23ce commit b29328a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ggml/src/ggml-opencl/ggml-opencl.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,9 @@ static void load_cl_kernels(ggml_backend_opencl_context *backend_ctx, ggml_cl_ve
631631
}
632632

633633
// mul_mv_q4_0_f32_1d_8x_flat
634-
{
634+
// This kernel does not compiler on Adreno cl compiler 38.01. Skip it for
635+
// those compiler versions since it is anyway not used for Adreno.
636+
if (backend_ctx->gpu_family != ADRENO || backend_ctx->adreno_cl_compiler_version.major > 38) {
635637
#ifdef GGML_OPENCL_EMBED_KERNELS
636638
const std::string kernel_src {
637639
#include "mul_mv_q4_0_f32_1d_8x_flat.cl.h"
@@ -647,7 +649,9 @@ static void load_cl_kernels(ggml_backend_opencl_context *backend_ctx, ggml_cl_ve
647649
}
648650

649651
// mul_mv_q4_0_f32_1d_16x_flat
650-
{
652+
// This kernel does not compiler on Adreno cl compiler 38.01. Skip it for
653+
// those compiler versions since it is anyway not used for Adreno.
654+
if (backend_ctx->gpu_family != ADRENO || backend_ctx->adreno_cl_compiler_version.major > 38) {
651655
#ifdef GGML_OPENCL_EMBED_KERNELS
652656
const std::string kernel_src {
653657
#include "mul_mv_q4_0_f32_1d_16x_flat.cl.h"

0 commit comments

Comments
 (0)