File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1872,7 +1872,8 @@ static const ggml::cpu::tensor_traits * ggml_repack_get_optimal_repack_type(cons
1872
1872
static bool supports_tensor (const struct ggml_tensor * op) {
1873
1873
if (op->op == GGML_OP_MUL_MAT &&
1874
1874
op->src [0 ]->buffer &&
1875
- (ggml_n_dims (op->src [0 ]) == 2 ) && ggml_repack_get_optimal_repack_type (op->src [0 ])) {
1875
+ (ggml_n_dims (op->src [0 ]) == 2 ) && (ggml_n_dims (op->src [1 ]) == 2 ) &&
1876
+ ggml_repack_get_optimal_repack_type (op->src [0 ])) {
1876
1877
1877
1878
if (op->src [1 ]->buffer && !ggml_backend_buft_is_host (op->src [1 ]->buffer ->buft )) {
1878
1879
return false ;
@@ -1883,7 +1884,8 @@ static bool supports_tensor(const struct ggml_tensor * op) {
1883
1884
}
1884
1885
1885
1886
} else if (op->op == GGML_OP_MUL_MAT_ID && op->src [0 ]->buffer &&
1886
- (ggml_n_dims (op->src [0 ]) == 3 ) && ggml_repack_get_optimal_repack_type (op->src [0 ])) {
1887
+ (ggml_n_dims (op->src [0 ]) == 3 ) && (ggml_n_dims (op->src [1 ]) == 2 ) &&
1888
+ ggml_repack_get_optimal_repack_type (op->src [0 ])) {
1887
1889
1888
1890
if (op->src [1 ]->buffer && !ggml_backend_buft_is_host (op->src [1 ]->buffer ->buft )) {
1889
1891
return false ;
You can’t perform that action at this time.
0 commit comments