diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-05-24 01:13:04 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-14 08:18:59 +0200 |
| commit | c5a1b660ac1b74e274cf14474e7a8850ec1d1af0 (patch) | |
| tree | 0df2005cccf89c0cb95ed8dab3bc1fd31e8e4360 | |
| parent | 8d3cd6f2ec22dc3079a9ce5f632d09a0526954b9 (diff) | |
| download | ffwd-c5a1b660ac1b74e274cf14474e7a8850ec1d1af0.tar.gz ffwd-c5a1b660ac1b74e274cf14474e7a8850ec1d1af0.zip | |
cpu: reduce initial workspace capacity
| -rw-r--r-- | pplx_embed.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pplx_embed.c b/pplx_embed.c index ebe945c..d007dce 100644 --- a/pplx_embed.c +++ b/pplx_embed.c @@ -67,6 +67,7 @@ int qwen_verbose = 0; #define PPLX_BF16_QKV_FUSE_MAX_SEQ 16 #define PPLX_BF16_PAIR_FUSE_MAX_SEQ 4 +#define PPLX_MIN_WORKSPACE_SEQ_CAP 16 /* ======================================================================== * Size helpers @@ -90,7 +91,7 @@ static int grow_cap(int current, int needed, int *out) { if (needed <= 0) return -1; - int cap = current > 0 ? current : 64; + int cap = current > 0 ? current : PPLX_MIN_WORKSPACE_SEQ_CAP; while (cap < needed) { if (cap > INT_MAX / 2) return -1; cap *= 2; |
