TensorData and TensorStorage are parallel layers — unify the storage model (ownership, views, dtype/encoding, placement): SKEEP-003 discussion anchor
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- kotlin
- Ambito
- machine-learning
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Kotlin
- Stelle
- 52
- Fork
- 15
- Merge medio
- 1g 8h
- PR unite (30g)
- 37
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SKaiNET-developers/SKaiNET
-
coding good first issue platform size:xs skill:js sub-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SKaiNET-developers/SKaiNET#1232 ·
I maintainer di solito rispondono entro 1 giorno
-
skeep tracking
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
SKaiNET-developers/SKaiNET#1331 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
assessment size:s skill:review sub-issue
Difficoltà 4/5 1-2 giorni Idoneità per principianti 18/100
SKaiNET-developers/SKaiNET#1330 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue size:s skill:docs sub-issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
SKaiNET-developers/SKaiNET#1329 ·
I maintainer di solito rispondono entro 1 giorno
-
coding good first issue size:s skill:kotlin-core sub-issue
Difficoltà 3/5 Mezza giornata Idoneità per principianti 75/100
SKaiNET-developers/SKaiNET#1328 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di SKaiNET-developers/SKaiNET
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
damontecres/Wholphin#2069 ·
I maintainer di solito rispondono entro 1 giorno
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
margelo/react-native-vision-camera#4217 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
saisaharsh3/Leftovers#13 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 67/100
navikt/esyfo-narmesteleder#700 ·
I maintainer di solito rispondono entro 1 giorno
-
[DEV] Update ktlintApertabackend maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
digitalfabrik/entitlementcard#3183 ·
I maintainer di solito rispondono entro 7 giorni