Panama FP32 matmul: first call in a JVM differs by an ULP from later calls (JIT-dependent reduceLanes order)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- kotlin
- 領域
- performance
調査の方向性
Start with PanamaVectorMatmulKernel and inspect its FloatVector.reduceLanes(ADD) reduction, then read DirectCpuExecutionContextScheduleTest for the existing warm-up behavior. Reproduce the first-call versus later-call difference on the same context with identical inputs. Done when repeated calls produce consistent results regardless of whether the JVM has compiled the intrinsic.
索引モデルが issue の本文から書いたものです。
説明
Summary
On a fresh DirectCpuExecutionContext() the first dense FP32 matmul in a JVM process produces results that differ by 1 ULP (in ~37k of 153k elements for m=300, k=64, n=512) from every later call on the same context with the same inputs. After that first call the results are stable and independent of threading or schedule.
Observed while writing SKEEP-005 parity tests (DirectCpuExecutionContextScheduleTest): probe output
same-ctx twice diff=37355 (first call vs second call)
seq twice diff=0
par-vs-seq diff=0
Likely cause
PanamaVectorMatmulKernel reduces with FloatVector.reduceLanes(ADD), whose lane-reduction order is unspecified and differs between the interpreter/C1 fallback and the C2 intrinsic. The first call runs before the intrinsic is compiled.
Why it matters
- Golden-token parity gates (
*GoldenTokenParityTestin SKaiNET-transformers) assert exact llama.cpp text equality; a warm-up-dependent ULP can flip a greedy argmax. - Any test comparing two contexts must warm up first (the SKEEP-005 tests now do).
Options
- Replace
reduceLaneswith an explicit fixed-order tree reduction (reduceLanesToLong-style) or accumulate into a vector and reduce with a deterministic scalar loop. - Document the property and add a warm-up helper for parity tests.
Not fixed in feature/skeep-005-schedules; the schedule tests warm up before comparing.
- 主要言語
- Kotlin
- スター
- 52
- フォーク
- 15
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 37
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SKaiNET-developers/SKaiNET のほかの issue
-
coding good first issue platform size:xs skill:js sub-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SKaiNET-developers/SKaiNET#1232 ·
メンテナーはふだん 1 日以内に返信
-
skeep tracking
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
SKaiNET-developers/SKaiNET#1331 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
assessment size:s skill:review sub-issue
難易度 4/5 1〜2日 初心者へのやさしさ 18/100
SKaiNET-developers/SKaiNET#1330 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue size:s skill:docs sub-issue
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
SKaiNET-developers/SKaiNET#1329 ·
メンテナーはふだん 1 日以内に返信
-
coding good first issue size:s skill:kotlin-core sub-issue
難易度 3/5 半日 初心者へのやさしさ 75/100
SKaiNET-developers/SKaiNET#1328 ·
メンテナーはふだん 1 日以内に返信
SKaiNET-developers/SKaiNET の issue をすべて見る
似ている issue
-
[BUG] Navigation drawer drops library-name suffixes without ellipsis (1.0.8, NVIDIA Shield)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
damontecres/Wholphin#2069 ·
メンテナーはふだん 1 日以内に返信
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
margelo/react-native-vision-camera#4217 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
saisaharsh3/Leftovers#13 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
navikt/esyfo-narmesteleder#700 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nightscout/AndroidAPS#5280 ·
メンテナーはふだん 1 日以内に返信