From 213d9a13cbaad1a160996733e7b0cc25d76e7704 Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Sun, 13 Sep 2026 23:11:55 +0800 Subject: [PATCH 1/2] docs: correct backend and optimizer summary Signed-off-by: nightcityblade --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cdd925f..5bdd8b2 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,12 @@ [![crates.io](https://img.shields.io/crates/v/oxmera?label=crates.io)](https://crates.io/crates/oxmera) [![MSRV](https://img.shields.io/badge/MSRV-1.88-orange)](Cargo.toml) [![GPU](https://img.shields.io/badge/Apple%20Metal-accelerated-brightgreen)](crates/oxmera-metal) +[![GPU](https://img.shields.io/badge/NVIDIA%20CUDA-accelerated-76B900)](crates/oxmera-cuda) [![ci](https://img.shields.io/github/actions/workflow/status/vyncint/oxmera/ci.yml?label=ci)](https://github.com/vyncint/oxmera/actions/workflows/ci.yml) [![stress](https://img.shields.io/github/actions/workflow/status/vyncint/oxmera/stress.yml?label=pty%20stress)](https://github.com/vyncint/oxmera/actions/workflows/stress.yml) -A Rust-native tensor and deep-learning framework: multi-threaded CPU and -**Apple-Silicon Metal** backends, tape-based reverse-mode **autograd**, +A Rust-native tensor and deep-learning framework: multi-threaded CPU, +**Apple-Silicon Metal**, and **NVIDIA CUDA** backends, tape-based reverse-mode **autograd**, neural-network layers and optimizers, **safetensors** weights, and an interactive **terminal training dashboard** — every terminal surface tested through a real PTY with deterministic golden frames. @@ -36,7 +37,7 @@ let logits = model.forward(&x)?; | devices | CPU (rayon-parallel, cache-tiled GEMM), Apple Metal (MSL compute kernels, threadgroup reductions, tiled GEMM over unified memory) and NVIDIA CUDA (the same kernels in CUDA C, shipped as PTX and driven through the driver API — no CUDA toolkit needed to build, `libcuda` found at runtime); `tensor.to_device(...)` moves data, autograd flows across the move | | autograd | tape-based reverse mode: `requires_grad`, `backward()`, gradient accumulation, `no_grad` RAII guard — every VJP validated by finite differences in CI | | nn | `Linear`, `Conv2d`, `Embedding`, `LayerNorm`, `BatchNorm2d`, `Dropout`, `Sequential`; `MSELoss`, `CrossEntropyLoss`, `BCEWithLogitsLoss`; Kaiming/Xavier initializers | -| optim | `SGD` (momentum, weight decay), `Adam`, `AdamW`, `RMSprop` — all with per-group learning rate and weight decay (`ParamGroup`); one fused launch per parameter on Metal and CUDA | +| optim | `SGD`, `Adam`, and `AdamW` with per-group learning rate and weight decay (`ParamGroup`); decay-free `RMSprop` with per-group learning rate; one fused launch per parameter on Metal and CUDA | | linalg | `eye`/`diag`/`diag_embed`/`trace`, batched `cholesky` (differentiable), `logdet`/`det`, `eigh`; rank-4+ matmul broadcasting and a two-operand `einsum` | | weights | zero-config `safetensors` save/load by parameter name | | terminal | `oxmera doctor` (hardware, devices, capabilities) and `oxmera train --tui` (live loss/accuracy sparklines, progress gauges, throughput, unified-memory usage) — both golden-tested through a real PTY with a 100-iteration determinism stress | From 6fae6929150f90a2b3d8fa2bf69779adcfc8efb6 Mon Sep 17 00:00:00 2001 From: Vyncint Ng <115854244+vyncint@users.noreply.github.com> Date: Sun, 13 Sep 2026 22:42:13 +0700 Subject: [PATCH 2/2] docs: keep SGD's momentum, scope the fused-launch claim, re-wrap Three follow-ups to the backend and optimizer correction. The optim row lost `SGD` (momentum, weight decay) when it was rewritten, and `momentum` then appeared nowhere in the README although `Sgd` takes it (`with_config(params, lr, momentum, weight_decay)`). Restored, while keeping the weight-decay grouping the rewrite got right. The clause that closes the row read as covering all four optimizers. `Backend::adam_step` is the only fused kernel and `AdamCore::step` its only caller, so Adam and AdamW have it and SGD and RMSprop step through composite tensor ops. Named, so the row is accurate end to end rather than in its first half. The headline's CUDA line ran to 92 characters against a paragraph whose other lines are 52 to 77; re-wrapped to 69 or under, and the serial comma dropped to match the devices row below it. Both GPU badges also carried the alt text `GPU`; they now read `Metal` and `CUDA`. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com> --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5bdd8b2..8e064c2 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,17 @@ [![license](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue)](LICENSE-MIT) [![crates.io](https://img.shields.io/crates/v/oxmera?label=crates.io)](https://crates.io/crates/oxmera) [![MSRV](https://img.shields.io/badge/MSRV-1.88-orange)](Cargo.toml) -[![GPU](https://img.shields.io/badge/Apple%20Metal-accelerated-brightgreen)](crates/oxmera-metal) -[![GPU](https://img.shields.io/badge/NVIDIA%20CUDA-accelerated-76B900)](crates/oxmera-cuda) +[![Metal](https://img.shields.io/badge/Apple%20Metal-accelerated-brightgreen)](crates/oxmera-metal) +[![CUDA](https://img.shields.io/badge/NVIDIA%20CUDA-accelerated-76B900)](crates/oxmera-cuda) [![ci](https://img.shields.io/github/actions/workflow/status/vyncint/oxmera/ci.yml?label=ci)](https://github.com/vyncint/oxmera/actions/workflows/ci.yml) [![stress](https://img.shields.io/github/actions/workflow/status/vyncint/oxmera/stress.yml?label=pty%20stress)](https://github.com/vyncint/oxmera/actions/workflows/stress.yml) A Rust-native tensor and deep-learning framework: multi-threaded CPU, -**Apple-Silicon Metal**, and **NVIDIA CUDA** backends, tape-based reverse-mode **autograd**, -neural-network layers and optimizers, **safetensors** weights, and an -interactive **terminal training dashboard** — every terminal surface tested -through a real PTY with deterministic golden frames. +**Apple-Silicon Metal** and **NVIDIA CUDA** backends, tape-based +reverse-mode **autograd**, neural-network layers and optimizers, +**safetensors** weights, and an interactive **terminal training +dashboard** — every terminal surface tested through a real PTY with +deterministic golden frames. ```rust use oxmera::nn::{CrossEntropyLoss, Linear, Module, Sequential}; @@ -37,7 +38,7 @@ let logits = model.forward(&x)?; | devices | CPU (rayon-parallel, cache-tiled GEMM), Apple Metal (MSL compute kernels, threadgroup reductions, tiled GEMM over unified memory) and NVIDIA CUDA (the same kernels in CUDA C, shipped as PTX and driven through the driver API — no CUDA toolkit needed to build, `libcuda` found at runtime); `tensor.to_device(...)` moves data, autograd flows across the move | | autograd | tape-based reverse mode: `requires_grad`, `backward()`, gradient accumulation, `no_grad` RAII guard — every VJP validated by finite differences in CI | | nn | `Linear`, `Conv2d`, `Embedding`, `LayerNorm`, `BatchNorm2d`, `Dropout`, `Sequential`; `MSELoss`, `CrossEntropyLoss`, `BCEWithLogitsLoss`; Kaiming/Xavier initializers | -| optim | `SGD`, `Adam`, and `AdamW` with per-group learning rate and weight decay (`ParamGroup`); decay-free `RMSprop` with per-group learning rate; one fused launch per parameter on Metal and CUDA | +| optim | `SGD` (momentum), `Adam` and `AdamW` with per-group learning rate and weight decay (`ParamGroup`); decay-free `RMSprop` with per-group learning rate; `Adam`/`AdamW` take one fused launch per parameter on Metal and CUDA | | linalg | `eye`/`diag`/`diag_embed`/`trace`, batched `cholesky` (differentiable), `logdet`/`det`, `eigh`; rank-4+ matmul broadcasting and a two-operand `einsum` | | weights | zero-config `safetensors` save/load by parameter name | | terminal | `oxmera doctor` (hardware, devices, capabilities) and `oxmera train --tui` (live loss/accuracy sparklines, progress gauges, throughput, unified-memory usage) — both golden-tested through a real PTY with a 100-iteration determinism stress |