本文へ移動
AI NEWS JOURNAL
ONE EVENT. MANY PERSPECTIVES.

llama.cpp · b11906

ggml-cpu : rewrite concat as one row kernel for all types (#31179) Every dst row comes from src0 or src1, or for dim 0 from the row of src0 followed by the row of src1, so a single kernel covers every type: a dense source row is one memcpy, quantized types included, and a strided source is copied element by element with the element size known at compile time. Rows are split across threads instead of i2 alone, which is often 1, and are copied in tiles of 32: for a transposed source the elements are walked in the outer loop, so the rows of a tile read neighboring addresses instead of jumping a full row stride per element. Add transposed b cases to test_concat, the layout of the delta-net conv input, and a perf case for it. **Website:** - **Attestations:** - **macOS/iOS:** - [macOS Apple Sili

1 件の独立した情報源 · 1 件の報道古い順 ↕
公開日時順

b11906

ggml-cpu:すべての型に対して、concatを1行のカーネルに書き直す(#31179) 各ターゲット行は、ソース0またはソース1から生成されるか、次元0の場合にはソース0の行に続いてソース1の行が続くため、単一のカーネルで全型をカバーできます。密度の高いソース行は、量子化された型を含めて、1回のmemcpyで処理され、ストライド付きのソースはコンパイル時に要素サイズが判明しているため、要素ごとにコピーされます。行はi2だけで分割するのではなくスレッド間で分割され、通常は1であるi2よりも効率的です。また、32要素ずつのタイル単位でコピーされます。転置されたソースの場合、外側のループで要素を順に走査するため、タイル内の各行は隣接するアドレスを読み取り、要素ごとにフルな行のストライドを飛ばすのではなくなります。test_concatやdelta-net conv入力のレイアウト、さらにその性能テスト用のケースに、転置されたbケースを追加してください。 **ウェブサイト:** - **証明書:** - **macOS/iOS:** - [macOS Apple Sili

経緯と関連報道