Commit Graph
4 Commits
Author SHA1 Message Date
Omar SobhandClaude Opus 5 9575b84803 style: clear the fmt gate and two lib clippy warnings
CI / Format Check (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Deferred deliberately while the TWIN-2B/2C campaign had live marches:
each march is a fresh `cargo test` invocation, so reformatting
`turek_hron_fsi2.rs` mid-campaign would have forced a test-binary
rebuild and cost comparability for a cosmetic gate. The family closed,
so this is now free.

- `cargo fmt --all` across 8 files that had drifted (including the
  FSI2/FSI3 harnesses touched by the UMEAN/ES override commits).
- `rtx-feature-store/tests/integration_tests.rs` had trailing
  whitespace rustfmt refused to format around ("left behind trailing
  whitespace" internal error), so the whole file was being skipped;
  stripped it and the file formats now.
- Two `unnecessary_parentheses` warnings in the rtx-transformers lib
  (`continual/progressive.rs`, `curriculum/mod.rs`) — these were the
  only rustytorch warnings surfacing through omni-cortex's workspace
  clippy gate, which is how they were found.

No behaviour change. rtx-fsi test binaries still build.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01B1feFAQxjbCRHePUdxuNra
2026-09-02 19:15:53 -07:00
quantumandClaude Fable 5 c36cf2f8a7 rtx-backend-metal: fix swap_dims returning a corrupt strided view
swap_dims copied the buffer but wrote elements back at their ORIGINAL
positions (new_idx was computed with the swapped strides), returning a
stride-swapped non-contiguous tensor. Every other op in this backend —
elementwise kernels, MPS matmul, to_vec — reads raw buffers and ignores
strides, so any transpose consumer (notably the autograd matmul backward,
grad_a = grad_c @ b^T) silently computed on untransposed data. Found via
CPU-vs-Metal gradient parity on the DigiGraph HetGAT: forward matched,
gradients were ~2x off.

swap_dims now physically permutes into a contiguous result (reading
through the input's strides + offset), and reshape asserts contiguity
instead of silently reinterpreting a non-contiguous buffer. 3 new parity
tests incl. matmul-after-transpose (25 total pass on-device).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-21 06:11:38 -07:00
quantumandClaude Fable 5 9297976929 rtx-backend-metal: GPU index_select / index_add via one-hot CSR SpMM
Override the Backend trait's host-round-trip defaults: gather is S @ X with
S the [E x N] one-hot selection CSR; scatter-add is the adjoint S^T @ X,
whose CSR is built directly by counting sort so duplicate indices land in
one row and the spmm kernel (one thread per output element) accumulates
them without atomics. CSR matrices are cached per thread keyed by the
exact index list + dims, so a static graph topology (GNN message passing)
builds each matrix once. Host fallback on degenerate shapes or any
sparse-pipeline failure.

13 new parity tests vs CPU reference: duplicates, unreferenced rows,
D=1/2/3, 15k x 5k x 64 gather/scatter, cache reuse, adjoint roundtrip.
Verified on-device that the SpMM path (not the fallback) serves all 13.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-21 05:56:23 -07:00
redclawsystems 4d88dc0584 Initial commit 2026-03-04 00:08:42 +00:00