compute: std/tensor on the CPU #82
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
An epic:
std/tensoron the CPU, pure TorbScript onBuffer<Item>(layer 1 of the compute plan). It is not one PR. COMPUTE.md is a stub whose full design "comes before the first of these packages is built", so the first step is the design record, and the build follows its slices.Source
windowsand "the tensor loop"), COLLECTIONS gap 6, LINEAR gaps 8 and 9Acceptance criteria
std/tensorexists as the design record of step 1 specifies it:Tensor<Scalar>over aBuffer<Scalar>with a run-time shape, broadcasting, slices, elementwise operations, reductions,dotandmatmul, with tests in both back ends and the cost table of the record filled in.Steps
Each step is one PR of one or two Conventional Commits and is filed as its own issue only when it starts (just in time). The list follows section 11 of the record (
docs/design/TENSOR.md); slice order and waits are there.docs/design/TENSOR.md(#438)std/tensor:Tensor<Scalar>over aBuffer, shape and strides, construction, indexing,Iterate,Show,Equals, tests, docs page (#691)Add,Subtract,Multiply<Scalar>,Divide<Scalar>,Negate,scaled,divided,shifted,mapped,broadcast, shape errorsreshaped,flattened,transposed,permuted,expanded,squeezed,sliced,selected,Slice,MutableSlice,compacted,fill,map,combine,accumulatesum,product,minimum,maximum,meanand the axis formsdot,matmul,assignProductuniform,normalforFloat64overstd/randommatmul(rank 3 and more)extend Float32 with Real(new natives, two-commit rule; the seed refresh is the owner's; any time)windows(waits forwindowsoverBuffer, epic #55)Design record point
COMPUTE.md section 2 ("the order":
Buffer<Item>, thenstd/tensoron the CPU andDual, which are pure TorbScript without foreign functions); COMPUTE.md section 1, layer 1.Seed
Touches the seed: expected no.
std/tensoris a new package of ordinary TorbScript: no syntax change, no native, no driver flag, no std name the compiler looks up by string. Step 1 (documentation) states it per slice; a slice that needs a native or a checker change falls under the two-commit rule ofCLAUDE.md, with the seed refresh staying with the owner, and a checker gap found by the probe of step 1 (operators with a foreignOtherandOutput) becomes its own issue.Dependencies
Buffer<Item>): merged. #299 and #300 (compiler natives,Bufferis aList,BytesisBuffer<UInt8>): merged.Buffer;windowstakes anArrayListtoday).Dual, pure TorbScript, no dependency on this epic). Blocked by this epic: #85 (std/gpu, also needs #84) and through it #86 (reverse mode andstd/learning).Buffer) shares the in-place promise of #54 and thewindowsloop, but neither waits for the other.Moved from the planning lists of the docs; the design record stays the specification.
std/gpu#85[loop:torbscript] intake: in scope (author orion, label loop), source COMPUTE.md section 2, not a duplicate. Pure TorbScript on
Buffer<Item>; depends on #54. next: waiting (dependency #54) until 2026-10-10T04:00:00Zstd/gpu#85[loop:torbscript] claim refine by session:loop-torbscript-20261023 until 2026-10-23T18:08Z
std/tensoron the CPU (step 1 of #82) #438[loop:torbscript] decided by the loop: #82 is an epic, not one PR, so it stays without
readyand only its first step is filed: #438 (design recorddocs/design/TENSOR.md, documentation only, labelledloopandready).Why: COMPUTE.md is a stub that states its full design comes before the first of these packages is built; nothing fixes the
Tensor<Scalar>layout, view against copy for slices, the broadcasting rule and error type, or whetherTensor * Scalarpasses today's checker. The same shape as #55, whose step 1 was the design record #413. The body is rewritten as an epic with a checklist (steps 2 to 6 are the plan until the record replaces them; each is filed only when it starts), a seed statement (expected: does not touch the seed; pure TorbScript onBuffer) and dependencies.Dependencies: #54 (with #299 and #300) is merged. Step 6 (data-parallel loops) waits for #55, because
windowstakes anArrayListtoday. #83 (Dual) is independent. #85 and through it #86 are blocked by this epic; #92 shares the in-place promise but is not related. Duplicate search of open and closed issues for tensor, matrix, buffer and compute: no other issue covers this.Stage refine: claim by session:loop-torbscript-20261023 released. Worker usage: about 90k tokens.
next: waiting (epic: step #438 is ready, the epic itself closes when its checklist is done)
std/tensoron the CPU (step 1 of #82) #438scalar * valuewith a userMultiplyon the number type lowers as the builtin product #440Multiply<Scalar>andMultiplyon one generic type are refused as overlapping #441scalar * valuewith a userMultiplyon the number type lowers as the builtin product #440Dualnumbers (forward mode) #83[loop:torbscript] claim refine by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T12:02Z
std/tensor,Tensor<Scalar>over aBuffer(step 2 of #82) #691[loop:torbscript] refine: step 1 (#438) is done; the checklist now carries the nine slices of
docs/design/TENSOR.mdsection 11 instead of the old steps 2 to 6.decided by the loop: the first build slice is slice 1 of the record (package,
Tensor, constructors, indexing,Iterate/Show/Equals, tests, docs page,tensor-zerosandtensor-index), filed as #691 (loop,ready). Reshape and transpose move to slice 3 as the record cuts it; operators wait for slice 2. A keyword search of open and closed issues found no duplicate. #440 and #441 are closed and, per the record, block no slice. Seed: not touched. Later slices are filed just in time.released the claim of session:loop-torbscript-20261030
next: ready (#691)
std/gpu#85std/learning#86