Skip to content

Commit

Permalink
llamafile : disable sgemm for batch-size 1 (ggerganov#9330)
Browse files Browse the repository at this point in the history
  • Loading branch information
netrunnereve authored and arthw committed Nov 18, 2024
1 parent 8b7b410 commit e7f5c7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ggml/src/llamafile/sgemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e7f5c7d

Please sign in to comment.