TensorData and TensorStorage are parallel layers — unify the storage model (ownership, views, dtype/encoding, placement): SKEEP-003 discussion anchor
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- kotlin
- Área
- machine-learning
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Kotlin
- Estrellas
- 52
- Forks
- 15
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 36
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SKaiNET-developers/SKaiNET
-
coding good first issue size:xs skill:kotlin-core sub-issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
SKaiNET-developers/SKaiNET#1323 ·
Los mantenedores suelen responder en 1 día
-
coding good first issue platform size:xs skill:js sub-issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
SKaiNET-developers/SKaiNET#1232 ·
Los mantenedores suelen responder en 1 día
-
skeep tracking
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
SKaiNET-developers/SKaiNET#1331 ·
Los mantenedores suelen responder en 1 día
-
assessment size:s skill:review sub-issue
Dificultad 4/5 1-2 días Aptitud para principiantes 18/100
SKaiNET-developers/SKaiNET#1330 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue size:s skill:docs sub-issue
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
SKaiNET-developers/SKaiNET#1329 ·
Los mantenedores suelen responder en 1 día
Todos los issues de SKaiNET-developers/SKaiNET
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 73/100
tortuvshin/open-apps#377 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
supabase-community/supabase-kt#1413 ·
Los mantenedores suelen responder en 5 días
-
Type: Possible bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
spacecowboy/Feeder#1258 ·
Los mantenedores suelen responder en 1 día
-
[Submission] 抖音火山版Abiertosubmit-adaption submit-adaption-pre
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
BetterAndroid/android-notification-icon-project#744 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
utopia-rise/godot-jvm#1004 ·
Los mantenedores suelen responder en 1 día