Repository navigation
Remove cuda kernels nothing calls - #62
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Deletes 26 kernels from
kernels.cu(about 850 lines) along with their header declarations,ffi.rsentries and CPU stubs.kernels.cugoes from 1872 to 1024 lines.Why
23 of them had no
ffi.rsdeclaration, no stub and no Rust caller: the standalone loss, SGD/Adam step, pooling, batch norm, conv2d, dropout, gather, where, arange, copy and attention kernels. The ops they would serve already run through other paths (im2col for conv, ordinary ops for the rest).argmaxandargmax_axiswere declared but never used, andargmaxonly worked for a power-of-two n up to 1024.fillwas also unused.scaled_dot_product_attentionignoredcausalandmask.Dead code in a published crate is just a place for bugs to hide, so it goes. CLAUDE.md says
ffi.rshas one entry per symbol inkernels.cu, and this brings the two back in line.How it was verified
cargo testpassescargo clippy --all-targets -- -D warningsis cleancuda_parityon a GPU--releasecargo test --release --features cudapasses on an RTX 4050,cuda_parityincluded (16 cases).Checklist
tensor/opsandautograd/opsstill mirror each other///docs