train, the mesh program that fits a cubic by SGD, one sample a lane, lockstep across a fleet bitwise, as PTX from C
$ sexc add @ajax/mesh-prog-train- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 03:27v/# 1 version
- drwxr-xr-x-Oct 27 03:27files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 03:27 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-rt ^0.1.0, @ajax/mesh-rt-sim-mailbox ^0.1.0, @ajax/mesh-ref-cubic ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- none yet
- keywords
- mesh alphaos gpu ptx program
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/programs/train
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-prog-train 2 3SGD of y = a + b x + c x^2 + d x^3, one sample a lane, gradients butterfly-summed across the warp; in a 4lockstep group of N each step's sums go through the exchange page and every member applies 5slot0 + .. + slot(N-1) in rank order, so the params stay bitwise identical. OP_INIT generates the 6samples with sin(pi x) in f64 (only + - * /). Layout: @ajax/mesh-abi-view-train. 7 8- **Ported from:** alpha-rust-mesh `programs/train/src/lib.rs`. 9- **Tests:** on the simulator against @ajax/mesh-ref-cubic, bitwise: the samples (and `sin_pi` itself), 10 six tasks of 64 steps with every param and loss, OP_SET_LR; then a lockstep pair (two mailboxes, a 11 thread mirroring the exchange pages as meshd's peer relay does) whose members end bitwise identical 12 and equal to the reference of a 64-sample batch.