mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 05:48:47 +01:00
ggml : fix OpenCL broadcast requirement for ggml_mul (close #4453)
This commit is contained in:
parent
873637afc7
commit
55e87c3749
4
ggml.c
4
ggml.c
@ -7759,10 +7759,10 @@ static void ggml_compute_forward_mul_f32(
|
|||||||
const int ith = params->ith;
|
const int ith = params->ith;
|
||||||
const int nth = params->nth;
|
const int nth = params->nth;
|
||||||
|
|
||||||
// TODO: OpenCL kernel support broadcast
|
|
||||||
#ifdef GGML_USE_CLBLAST
|
#ifdef GGML_USE_CLBLAST
|
||||||
if (src1->backend == GGML_BACKEND_GPU) {
|
if (src1->backend == GGML_BACKEND_GPU) {
|
||||||
GGML_ASSERT(ggml_are_same_shape(src0, src1));
|
// TODO: OpenCL kernel support full broadcast
|
||||||
|
GGML_ASSERT(ggml_can_repeat_rows(src1, src0));
|
||||||
if (ith == 0) {
|
if (ith == 0) {
|
||||||
ggml_cl_mul(src0, src1, dst);
|
ggml_cl_mul(src0, src1, dst);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user