ggml-blas: add note
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
This commit is contained in:
parent
aae6d1e9b0
commit
717531b1a7
|
|
@ -513,13 +513,14 @@ static bool ggml_backend_blas_device_supports_op(ggml_backend_dev_t dev, const g
|
||||||
// TODO: find the optimal value
|
// TODO: find the optimal value
|
||||||
const int64_t min_batch = 32;
|
const int64_t min_batch = 32;
|
||||||
|
|
||||||
return ggml_is_contiguous(src0) &&
|
return ggml_is_contiguous(src0)
|
||||||
ggml_is_contiguous(src1) &&
|
&& ggml_is_contiguous(src1)
|
||||||
src0->view_src == nullptr &&
|
&& src1->type == GGML_TYPE_F32
|
||||||
src1->view_src == nullptr &&
|
// NOTE: llama-bench creates views that somehow does not go through init_tensor
|
||||||
src1->type == GGML_TYPE_F32 &&
|
// this prevents the uninitialized views from being used in BLAS
|
||||||
(ne0 >= min_batch && ne1 >= min_batch && ne10 >= min_batch) &&
|
&& src0->view_src == nullptr && src1->view_src == nullptr
|
||||||
(src0->type == GGML_TYPE_F32 || ggml_get_type_traits(src0->type)->to_float != NULL);
|
&& (ne0 >= min_batch && ne1 >= min_batch && ne10 >= min_batch)
|
||||||
|
&& (src0->type == GGML_TYPE_F32 || ggml_get_type_traits(src0->type)->to_float != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue