Skip to content

Commit 4cae702

Browse files
author
zhouwg
committed
ggml-qnn: AI-assisted ggml_qnn_mul_mat_4d by Grok 3 ---finalizing version also both ok in step13
1 parent 1325a8f commit 4cae702

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml/src/ggml-qnn/ggml-qnn-ops.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,8 @@ static void ggml_qnn_mul_mat_4d(ggml_backend_qnn_context *ctx, ggml_tensor *op)
344344
uint32_t B0 = src0->ne[2] * src0->ne[3]; // src0 batch
345345
uint32_t B1 = src1->ne[2] * src1->ne[3]; // src1 batch (drives output)
346346

347-
// Validate
347+
// Validate K only
348348
GGML_ASSERT(src0->ne[0] == src1->ne[0]); // K must match
349-
//GGML_ASSERT(dst->ne[0] == N && dst->ne[1] == M && dst->ne[2] == src1->ne[2] && dst->ne[3] == src1->ne[3]);
350349

351350
// src0: [K, M, H0, B0] -> QNN: [B0, H0, M, K]
352351
uint32_t src0_dims[] = {static_cast<uint32_t>(src0->ne[3]), static_cast<uint32_t>(src0->ne[2]), static_cast<uint32_t>(src0->ne[1]), static_cast<uint32_t>(src0->ne[0])};
@@ -471,6 +470,7 @@ static void ggml_qnn_mul_mat_4d(ggml_backend_qnn_context *ctx, ggml_tensor *op)
471470

472471
op_perf.info();
473472
}
473+
474474
/*
475475
* @brief performs matrix multiplication with FP32 & quantized weights and floating-point inputs
476476
* using the QNN backend. this function performs matrix multiplication of the input tensor

0 commit comments

Comments
 (0)