Repository navigation
build: guards for SKEEP-003's acceptance criteria (#1501) - #1509
Open
michalharakal wants to merge 3 commits into
Open
michalharakal wants to merge 3 commits into
michalharakal wants to merge 3 commits into
Conversation
An audit at 0.64.0 found the old storage layer still in place beside the new one. The SKEEP goes back to Accepted and gains a status table per acceptance criterion and per open decision, linking the issues that track them. 003a, SKEEP-002, memory-model.adoc and the TensorStorage KDoc lose statements that later work made untrue. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
checkTensorDataDowncasts counts downcasts to concrete TensorData classes outside the data package against an allowlist that has to match the code exactly: 162 sites in 21 files today. It runs in the stub-markers CI leg. ForwardScopeFlatMemoryTest runs 300 forward passes under a forward scope on the JVM and asserts that direct memory, RSS and the slab stay flat. reference/benchmark-baseline.adoc records the JMH numbers a dispatch or storage change is compared against; scripts/pr-gate.sh points at it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
📖 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. |
…ryTest (#1501) RSS grew past the bound on a CI runner although nothing leaked: a JVM commits heap lazily, so RSS follows garbage that is already dead. The test now asserts the live heap after a collection and prints RSS. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
📖 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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1501. Part of #932.
Stacked on #1508 (the docs close-out): until that merges, this PR also shows its commit. Review the second commit.
Three of SKEEP-003's five acceptance criteria had no test or guard.
./gradlew checkTensorDataDowncastsscans production sources outsidetensor/data,tensor/storageandlang/memoryforis/!is/as/as?whose target is a…TensorDataclass or a storage marker (PackedBlockStorage,RowDequantSource, the MemorySegment markers). The count per file has to equalconfig/tensor-data-downcast-allowlist.txt, the same rule ascheckUnmarkedStubs: a new downcast fails, and a removed one fails until the entry is lowered. Today: 162 downcasts in 21 files (DefaultCpuOps.kt51,DefaultCpuOpsJvm.kt48,AccelerateCpuOps.kt18,WasmCpuOps.kt10,QuantizedMatmul.kt9, the rest 1–3 each). It runs in the existingstub-markersCI leg. This changes no behaviour; it makes the migration in SKEEP-003: dispatch on Format instead of TensorData downcasts, loaders return views, TensorData as true façades #1507 measurable.ForwardScopeFlatMemoryTest(JVM) runs 300 steps of matmul, add and relu at 512 × 512 withreset()at each step boundary. After 20 warm-up steps it asserts that the direct buffer pool grows by less than one step's activations, the live heap after a collection by less than a tenth of what a leak of every activation would be (about 840 MB), and the slab peak not at all. Measured here: no growth in any of the three. RSS is printed, not asserted: it failed on a CI runner without a leak, because a JVM commits heap lazily.reference/benchmark-baseline.adocholds the JMH numbers forMatmulBench,KernelMatmulBench,QuantizedMatmulBench,ElementwiseAdd1MBenchandReductions1MBenchatdevelop0.64.0, with how to compare.scripts/pr-gate.sh --benchreferred to a baseline that docs: describe the memory model as built, and fold the loose files into Antora #1106 had deleted and now points at this page.One observation from the baseline, not addressed here: on Linux,
MatmulBenchwithblasEnabled=trueis about seven times slower than the Panama kernel (8.5 ms against 1.3 ms at 256). BLAS routing is off by default outside macOS.🤖 Generated with Claude Code