Skip to content

Cleanup the code - #61

Merged
CanReader merged 3 commits into
masterfrom
cleanup/comments
Oct 28, 2026
Merged

CanReader merged 3 commits into
masterfrom
cleanup/comments

Conversation

@CanReader

Copy link
Copy Markdown
Owner
  • move the schedule tests into the module
  • refactor: refactor, trim comments and make code clean

What this changes

Trims comments across the crate to short why-notes and deletes the ones that only restated the code. Repeated magic numbers get names, and a few duplicated bits are folded into helpers. README and examples are shortened. No behaviour change.

Why

Comments had grown into essays and a lot of literals were scattered around. This makes the files quicker to read and edit.

How it was verified

  • cargo test passes
  • cargo clippy --all-targets -- -D warnings is clean
  • Ran cuda_parity on a GPU
  • Trained an example in --release
  • No GPU here, CUDA side not runtime tested

Also: cargo doc has no warnings and cargo check --examples and cargo check --features cuda build. The .cu edits are comment and dead-code removal plus two named constants, and a standalone nvcc compile of kernels.cu had no errors.

Checklist

  • Every new or changed backward rule has a gradcheck case
  • Every new kernel has a cuda_parity case
  • tensor/ops and autograd/ops still mirror each other
  • Public items have /// docs

No new rules or kernels in this PR, so the first two are untouched. Tolerances and test cases are unchanged.

Notes

  • A few doctests were dropped (tensor/mod.rs, tensor/checked.rs, autograd/anomaly.rs, nn/mod.rs) along with the "Adding an op" list in autograd/mod.rs.
  • fastnn_cuda_argmax and fastnn_cuda_scaled_dot_product_attention in kernels.cu look broken and are not in the Rust FFI. Left alone here, will deal with them separately.

CanReader and others added 3 commits October 8, 2026 20:08
@CanReader
CanReader enabled auto-merge (squash) October 28, 2026 16:44
@CanReader
CanReader merged commit 38ce9f7 into master Oct 28, 2026
12 checks passed
@CanReader
CanReader deleted the cleanup/comments branch October 28, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant