TensorData and TensorStorage are parallel layers — unify the storage model (ownership, views, dtype/encoding, placement): SKEEP-003 discussion anchor
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- kotlin
調査の方向性
Read the TensorData code under skainet-lang-core/.../tensor/data/ alongside the 20-file TensorStorage layer under .../tensor/storage/, then trace which abstractions Tensor currently holds and where allocations and backend dispatch use them. Compare the two candidate end-states described in the issue and review the maintainer discussion; done requires a decided direction that preserves packed encodings bit-identically.
索引モデルが issue の本文から書いたものです。
説明
SKaiNET carries two storage abstractions:
TensorData(skainet-lang-core/.../tensor/data/) — the live one. EveryTensorholds one; backends dispatch by downcasting to concrete classes/markers (is Q4_KTensorData -> .packedData); all common-code storage is heap arrays.TensorStorage(.../tensor/storage/, 20 files) — a designed descriptor layer with the right concepts (BufferHandle.{Owned,Borrowed,Aliased,FileBacked,DeviceResident},Placement/MemoryDomain,TensorEncoding,MemoryPlanner,StorageSpec) whose own KDoc says "new loaders, planners, and backends should targetTensorStoragedirectly" — but which noTensorever holds.StorageSpechas zero consumers; the planner is never consulted at any allocation;Aliasedis never produced;FileBackedandDeviceResidentthrow in every consumer;LogicalDType.fromDTypehas no inverse, so the layer structurally cannot backTensor<T>today.
The result is a set of related, recurring costs:
- ownership is recorded but never enforced (lifetimes fell back to GC after explicit arenas OOM'd — the missing piece is a weights-persistent vs activations-transient scope split, which
Placement.Residencymodels but nothing uses) - two disconnected view systems (
SlicedTensorViewindex remap vsBufferHandle.Aliasedbyte range) - three type representations (
DTypeKClass generic,LogicalDTypeenum,TensorEncoding), with packed tensors erasing their logical dtype entirely (Q4_KTensorData : TensorData<DType, Byte>— a logically-FP32 weight is not typed as such; ops find it by class check) - placement/mmap/off-heap work (#921, #922, SKEEP-002) keeps landing at the edges because the middle isn't wired
An SKEEP-003 draft (PR to follow) lays out the analysis and two candidate end-states — (a) TensorStorage becomes the single byte-owner and TensorData a typed view protocol over it; (b) TensorData stays primary and absorbs BufferHandle/Placement, retiring the parallel descriptor — deliberately without a recommendation: the trade-off (dispatch rewrite + dtype coherence vs minimal churn + status quo dispatch) is a maintainer decision. Both directions share two prerequisites (two-way LogicalDType ↔ DType bridge; decide StorageSpec's fate) and one hard constraint: the packed-encoding system (7 GGML block formats, ternary, TurboQuant, kernel dispatch, StableHLO skainet.tensor_encodings export) must survive bit-identically.
Mechanical bugs found during the same audit are filed separately (TensorStorageFactory contract violations, GGUF encoding mapping dropping five formats, transfer-API gaps, rank-broken copyToFloatArray default, memory-diagnostics paper-cuts) — they are fixable under either end-state.
- 主要言語
- Kotlin
- スター
- 52
- フォーク
- 15
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SKaiNET-developers/SKaiNET のほかの issue
-
coding good first issue size:xs skill:kotlin-core sub-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
SKaiNET-developers/SKaiNET#1323 ·
メンテナーはふだん 1 日以内に返信
-
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 日以内に返信
-
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 日以内に返信
SKaiNET-developers/SKaiNET の issue をすべて見る
似ている issue
-
afk-ok area:data-quality importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
enorm-labs/event-junkie#3166 ·
メンテナーはふだん 1 日以内に返信
-
bugbane/qf good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
osservatorionessuno/bugbane#173 ·
メンテナーはふだん 1 日以内に返信
-
Android: build fails with Android Gradle Plugin 9 (kotlinOptions, lintOptions, proguard-android.txt)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
capacitor-community/stripe#544 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
theopenconversationkit/tock#2113 ·
メンテナーはふだん 1 日以内に返信