Skip to content

Add CUDA resource ownership - #47

Open
linear3735 wants to merge 3 commits into
ThinkFlowLab:mainfrom
linear3735:codex/laya-runtime
Open

linear3735 wants to merge 3 commits into
ThinkFlowLab:mainfrom
linear3735:codex/laya-runtime

Conversation

@linear3735

@linear3735 linear3735 commented Sep 30, 2026 •

Copy link
Copy Markdown

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 --locked

On 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.

  • I have reviewed the full diff and addressed the issues I found.
  • I have checked that the change follows the project's architecture and stays focused on the stated purpose.
  • I have run the checks appropriate to this change and reported commands, results, and anything I could not verify above.
  • I have checked that the PR description, documentation, and any accuracy or performance claims match the implementation and available evidence.

This branch has not been deployed

No deployments
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