Explorar o código

llamafile : disable sgemm for batch-size 1 (#9330)

Eve hai 1 ano
pai
achega
e536426ded
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      ggml/src/llamafile/sgemm.cpp

+ 4 - 0
ggml/src/llamafile/sgemm.cpp

@@ -1006,6 +1006,10 @@ bool llamafile_sgemm(int64_t m, int64_t n, int64_t k, const void *A, int64_t lda
     assert(nth > 0);
     assert(ith < nth);
 
+    // only enable sgemm for prompt processing
+    if (n < 2)
+        return false;
+
     if (Ctype != GGML_TYPE_F32)
         return false;