Add CUDA resource ownership - #47
Open
linear3735 wants to merge 3 commits into
Open
linear3735 wants to merge 3 commits into
linear3735 wants to merge 3 commits into
Conversation
This was referenced Sep 30, 2026
This branch has not been deployed
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.
Purpose
Add Rust ownership of a CUDA device, stream and buffers. Check copy bounds and keep resources alive until pending work completes. CPU builds do not link CUDA.
Part of #14. This is the resource layer for Laya; model execution comes separately. Core and configuration changes: 271 lines.
Tests now live under the repository-root
tests/directory. Cargo target names and test coverage are unchanged.Test Plan
cargo fmt --all --check cargo clippy --workspace --locked --all-targets -- -D warnings cargo test --workspace --locked cargo build --workspace --release --lockedOn H800, check allocation, a 4 KiB copy roundtrip and buffer lifetime after dropping the context handle.
System1-Omni Version / Commit:
a20b2da91805d247141c50559021442a004a0e36.Test Result
fmt, strict Clippy, release build passed locally; 25 CPU tests passed and 3 GPU tests were skipped. The existing H800 resource test passed against the same runtime source; this test-directory update does not change CUDA code.
Rust CI, Docs build and benchmark harness tests passed for this update.
Self-review
Before marking this PR ready for review or requesting maintainer review, complete
the self-review checklist.
Keep the PR in draft while this work is incomplete.
For agent assistance, use the optional precheck-pr skill.