compute: package std/tensor, Tensor<Scalar> over a Buffer (step 2 of #82) #691
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Slice 1 of
docs/design/TENSOR.mdsection 11, step 2 of #82 (compute:std/tensoron the CPU). The record (#438) decides everything this slice builds; read its sections 3 (type and layout, decisions 1 to 6), 4 (scalars), 7 (Index,Iterate,Show,Equals) and 10 (cost).Goal
A new package
std/tensorwithTensor<Scalar: Numeric = Float>, dense and row-major, built onBuffer<Scalar>as decisions 1 to 6 specify.Acceptance criteria
std/tensor/exists (manifest,src/,tests/, registered likestd/linearandstd/gradient) with the type of decision 1: privateshape,strides,offset,storage; the invariants I1 to I5 of decision 3 hold for every value (a negative extent panics with the message of decision 5).scalar,zeros,ones,filled,identity,of,over(no copy), with the zero-sized and rank 0 behaviour of decision 4.shape,rank,count,isDense,get(Option),IndexandMutableIndexonList<Int>with the panic messages of decision 6,Iteratein row-major order,Show, hand-writtenEquals(layout-independent, decision 3).std/tensor/tests/onFloat64,IntandFixed, passing in the VM and natively (torb test, both back ends).skills/(torb docs skill docs skills).tensor-zerosandtensor-indexinbenchmarks/plustools/tensor-cost.shin the pattern oftools/buffer-cost.sh; the PR records the numbers (a measurement, not a gate). Iftensor-zerosexceeds the bound 1.10, record it in the PR; do not add a native here.Design record point
docs/design/TENSOR.mdsection 11, slice 1; decisions 1 to 6, 9 (test scalars), section 10.Seed
Touches the seed: no. Ordinary TorbScript on
Buffer: no syntax, no native, no driver flag, no std name the compiler looks up. If a checker or compiler gap shows up, file it as its own issue and do not fix it here.Size
One PR, one Conventional Commit:
feat(tensor): Tensor<Scalar> over a Buffer.Out of scope
Elementwise operations, views, reshape and transpose (slices 2 and 3), reductions,
matmul,uniform/normal,Float32, the parallel loop. #440 and #441 (closed) block none of this.Dependencies
Part of #82. #54, #299, #300 merged; no open dependency.
std/tensoron the CPU #82std/tensoron the CPU #82[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T12:11Z
[loop:torbscript] release implement by session:loop-torbscript-20261030: worker ended (gateway restart). Draft PR #695 (head
77c3776b) is pushed but not finished: CI tier B fails in the conformance suite, tests/conformance/collection-words.trb allocates 213 blocks, over its budget of 212 by 1 (338 of 339 programs pass); the rest of CI is pending. A fix worker either removes the extra allocation or, if the change explains it, raises that one budget with the reason in the PR, then un-drafts the PR and requests argus. No worker lane is free this tick.next: waiting (worker lane for the CI fix on #695) until 2026-10-30T13:00:00Z
[loop:torbscript] claim implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T14:18:27Z
Draft PR #695: tier B fails on tests/conformance/collection-words.trb (213 blocks, budget 212).
next: waiting (CI fix on #695)
[loop:torbscript] claim implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:tkoehn until 2026-10-30T14:29:07Z
Respawn: the theorben spawn was refused (too many CLI live sessions), the retry was cut by a gateway restart. Draft PR #695: tier B fails on tests/conformance/collection-words.trb (213 allocations vs budget 212).
[loop:torbscript] release implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:tkoehn: worker interrupted by a gateway restart, no change on PR #695 (head
77c3776b).[loop:torbscript] claim implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T14:43:55Z
next: waiting (CI fix on #695)
[loop:torbscript] release implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:theorben: worker interrupted (failed worker, no change on PR #695, head
dd7ca583). PR #695 is also not mergeable (conflict with main), so the fix worker rebases first.next: waiting (worker lane for the CI fix on #695; #684 CI fix runs first) until 2026-10-30T15:30:00Z
[loop:torbscript] claim implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:tkoehn until 2026-10-30T18:24:00Z
Respawn after the interrupted theorben worker: PR #695 (head
dd7ca583) is not mergeable (conflict with main) and tier B failed earlier on tests/conformance/collection-words.trb (213 allocations vs budget 212).[loop:torbscript] checkpoint implementation (CI fix): rebased loop/691-tensor-core on current main (clean, 3 commits, head
034a467c, force-with-lease). The collection-words budget bump (212 to 213, already on the branch) holds: tier B is green (36m56s). Tier A is running; gates, seed pack and archives wait on it. Next: un-draft #695 and request argus once CI is green.[loop:torbscript] release implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:tkoehn: worker interrupted by a gateway restart after its checkpoint. Left: PR #695 (head
034a467c, rebased) has tier B green; tier A, gates, seed pack and archives still pending; forge still reports it not mergeable (re-check). A fix worker reads the final CI, fixes what is red, removes the WIP prefix and requests argus.next: implementation (CI fix on #695)
[loop:torbscript] claim implementation by session:loop-torbscript-20261030 @anthropic:tkoehn until 2026-10-30T22:32Z
[loop:torbscript] release implementation (CI fix) by session:loop-torbscript-20261030 @anthropic:tkoehn: worker interrupted by a gateway restart. Left: PR #695 now at head
41dc1979; its CI is still pending and the forge reports it not mergeable (re-check after CI). A fix worker reads the final CI, fixes what is red, resolves the conflict, removes the WIP prefix and requests argus.next: implementation (CI fix on #695)
std/gpu#85[loop:torbscript] claim implementation by session:loop-torbscript-20261030 @anthropic:tkoehn until 2026-10-31T02:20Z
[loop:torbscript] release implementation by session:loop-torbscript-20261030 @anthropic:tkoehn: worker interrupted by a gateway restart after finishing the rebase. PR #695 is at head
329ac411, mergeable, WIP prefix removed, argus requested; CI on that head is pending.next: waiting (CI and review of PR #695)