feat(storage): two-way LogicalDType ↔ DType bridge (SKEEP-003 P0, M0) - #1045
Conversation
|
Local gate Targeted: |
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
d875ea4 to
3e4d6f6
Compare
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
d760b80 to
5db6bf5
Compare
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
First code slice of the SKEEP-003 memory architecture (milestone M0, #1001). Decision #13 merges LogicalDType into one sealed DType; the prerequisite is a total, bijective bridge in both directions: - LogicalDType.toDType() — inverse of LogicalDType.fromDType; exhaustive when over the 14 constants, no else branch. - DType.toLogicalDType() — extension in sk.ainet.lang.tensor.storage (file LogicalDTypeBridge.kt, JVM facade DTypeBridge), keeping sk.ainet.lang.types a leaf package. - Computed dtype: DType on StorageSpec, TensorStorage and StorageMemoryReport; StorageSpec factories no longer call fromDType twice. toString() texts unchanged. - LogicalDTypeBridgeTest (commonTest): 14 ↔ 14 membership, explicit pair table, round trips both ways, bijectivity, sizeInBits/float-ness agreement, descriptors expose the dtype. - scripts/pr-gate.sh: local equivalent of the CI test legs (jvmTest, apiCheck, JS/Wasm tests, linuxX64Test, assemble, Java API tests; --bench adds StorageBenchmarks + JMH; auto-detects CHROME_BIN). - BCV: jvm dump regenerated (additions only). Purely additive; no consumer changed. Closes #1006 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5db6bf5 to
b62256e
Compare
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
1 similar comment
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
|
Rebased onto |
Summary
First code slice of the SKEEP-003 memory architecture (Phase P0, milestone M0 #1001): the two-way
LogicalDType↔DTypebridge that decision #13 requires beforeLogicalDTypecan be merged into one sealedDType.LogicalDType.toDType()— inverse of the existingLogicalDType.fromDType; exhaustivewhen, noelse.DType.toLogicalDType()— extension insk.ainet.lang.tensor.storage(fileLogicalDTypeBridge.kt, JVM facadeDTypeBridge), sosk.ainet.lang.typesstays a leaf package.dtype: DTypeonStorageSpec,TensorStorage,StorageMemoryReport(additive;toString()unchanged);StorageSpecfactories no longer callfromDTypetwice.LogicalDTypeBridgeTest(commonTest): 14 ↔ 14 membership, explicit pair table, round trips both ways, bijectivity,sizeInBits/float-ness agreement across the bridge, descriptors expose the dtype.scripts/pr-gate.sh— local equivalent of the CI legs (jvmTest,apiCheck, JS/Wasm tests,linuxX64Test,assemble, Java API tests;--benchadds StorageBenchmarks + JMH; auto-detectsCHROME_BINfor Karma) used before every memory-architecture PR.skainet-lang-corejvm dump regenerated — additions only (LogicalDType.toDType,DTypeBridge.toLogicalDType, threegetDtype()); theapi/androiddump is not produced by the current BCV setup (stale since feat(optim): mutable learning rate and warmup+cosine LR schedule #866) and is left untouched.developafter docs(skeep): SKEEP-003 accepted — decisions, memory-architecture design record, M0–M2 roadmap #1043 and chore(bcv): refresh stale skainet-compile-hlo API dump (pre-existing apiCheck failure on develop) #1047 merged (single commit, no CHANGELOG edit — release notes are written at release time).Purely additive; no consumer changed;
developbehaviour identical.Test plan
scripts/pr-gate.shoutput is in the first comment (full:jvmTest,apiCheck,verifyNpmPins jsTest wasmJsTest wasmWasiTest,linuxX64Test,assemble,:skainet-test:skainet-test-java:test).Closes #1006
🤖 Generated with Claude Code