Repository navigation
Conversation
Use indexed active leases and per-stream access counts to avoid scanning every held lease on the same-stream hot path. Add a standalone CUDA repro and Modal GPU runner for issue NVIDIA#1786. Co-authored-by: Copilot App <[email protected]> Signed-off-by: SycamoreQ <[email protected]>
|
This removes the same-stream quadratic cost but not its cause: a submission still takes one lease per access, so while another stream's work is pending, every conflicting |
|
Thanks for the review, @physwkim! I've moved the Modal runner and the repro crate over to issue #1786 as requested, and removed them from the Regarding the root cause: you're completely right. I'm updating the allocation submission path to reuse the existing I will push the updated code shortly. |
|
All tests are now passing. I've implemented the O(1) lease reuse logic you requested in
I removed the repro crate and Modal runner from I ran the full The commits are now signed. Thanks for the detailed review and guidance on the root cause! |
6e90d74 to
4b175d0
Compare
Summary
Avoid linear scans of outstanding allocation leases when repeatedly acquiring or releasing leases on one CUDA stream. The fast path now uses per-stream access counts and indexed lease lookup/removal. Closes #1786.
Changes
Testing
cargo fmt --all -- --check— passed.rustfmt --edition 2021 --check cuda-core/src/allocation.rs— passed.rustfmt --edition 2024 --check cuda-core/repro/lease_scaling/src/main.rs— passed.Python syntax compilation of
cuda-core/repro/lease_scaling/modal_runner.py— passed.cargo test -p cuda-core --lib access_counts_preserve_same_stream_and_cross_stream_exclusion— blocked duringcuda-bindingsbuild because no CUDA 13.0+ toolkit is installed on the host.GitHub reports the embedded SSH commit signature as
unknown_key; it is valid locally but this key is not recognized as a GitHub signing key, so the commit is not Verified on GitHub.The Modal runner and GPU repro were not executed.
just -f cuda-oxide/Justfile checkpasses (the local mirror of CI: fmt, clippy, tests, guards, docs)cargo oxide run <example>passes, orcuda-oxide/scripts/smoketest.sh -o '^<example>$'New example added (if applicable)
Checklist
git commit -s)git commit -S)