File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1920,7 +1920,7 @@ class extra_buffer_type : ggml::cpu::extra_buffer_type {
1920
1920
bool supports_op (ggml_backend_dev_t , const struct ggml_tensor * op) override {
1921
1921
if ( op->op == GGML_OP_MUL_MAT &&
1922
1922
op->src [0 ]->buffer &&
1923
- ( ggml_n_dims (op->src [0 ]) == 2 ) &&
1923
+ ggml_n_dims (op->src [0 ]) == 2 && ggml_n_dims (op-> src [ 1 ]) <= 2 &&
1924
1924
op->src [0 ]->buffer ->buft == ggml_backend_cpu_repack_buffer_type () &&
1925
1925
ggml_repack_get_optimal_repack_type (op->src [0 ])
1926
1926
) {
@@ -1936,7 +1936,7 @@ class extra_buffer_type : ggml::cpu::extra_buffer_type {
1936
1936
// may be possible if Q8_0 packed...
1937
1937
} else if (op->op == GGML_OP_MUL_MAT_ID
1938
1938
&& op->src [0 ]->buffer
1939
- && ( ggml_n_dims (op->src [0 ]) == 3 )
1939
+ && ggml_n_dims (op->src [0 ]) == 3 && ggml_n_dims (op-> src [ 1 ]) <= 2
1940
1940
&& op->src [0 ]->buffer ->buft == ggml_backend_cpu_repack_buffer_type ()
1941
1941
&& ggml_repack_get_optimal_repack_type (op->src [0 ])
1942
1942
) {
You can’t perform that action at this time.
0 commit comments