Skip to content

Add Rust CUDA buffer bindings - #15

Draft
yuanknv wants to merge 12 commits into
ros2:feature/torch-conversions-pyfrom
yuanknv:feat/rust-cuda-buffer
Draft

Add Rust CUDA buffer bindings#15
yuanknv wants to merge 12 commits into
ros2:feature/torch-conversions-pyfrom
yuanknv:feat/rust-cuda-buffer

Conversation

@yuanknv

@yuanknv yuanknv commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose CUDA Buffer allocation and scoped read/write access through an exception-safe C ABI
  • add a safe Rust package with RAII Buffer and access guards
  • validate ownership transfer and interprocess CUDA VMM zero-copy transport

Dependencies

This PR targets feature/torch-conversions-py, which contains the CUDA/Python backend stack used as its base.

Test plan

  • Run CUDA C ABI lifecycle tests
  • Run all Rust lifecycle tests
  • Run separate-process Rust publisher/subscriber validation
  • Confirm CUDA VMM import and zero cudaMemcpy* calls with Nsight Systems

nvcyc and others added 12 commits August 19, 2026 04:37
Signed-off-by: CY Chen <cyc@nvidia.com>
Signed-off-by: CY Chen <cyc@nvidia.com>
Signed-off-by: CY Chen <cyc@nvidia.com>
Expose typed CPU and CUDA tensor-message conversions, preserve DLPack-backed buffer ownership, and validate zero-copy inter-process rclpy transport.
Add an independent Python Torch vendor and keep CUDA integration optional so CPU and CUDA platforms use the same conversion API.
Keep package documentation centralized and avoid duplicating platform behavior details.
Rename the Python package to pytorch_vendor and align both vendor selectors with official CUDA 13.0 and 13.2 artifacts.
Separate CPU and CUDA conversion behavior behind a private registry so future hardware support does not change the public API.
Make the private extension's scope explicit so future hardware adapters can provide distinct native bridges.
Use a versioned C ABI so CPU users are not forced to install CUDA buffer runtime dependencies.
Keep the core CPU-capable package platform-independent and discover optional conversion adapters through Python entry points.
Expose CUDA buffer allocation through an exception-safe C ABI and a safe Rust RAII package with interprocess zero-copy validation.
@yuanknv
yuanknv force-pushed the feature/torch-conversions-py branch from 4dddf00 to f5c5175 Compare August 27, 2026 23:04
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.

2 participants