Sync v13.5-public from internal repo

This commit is contained in:
cuda-samples sync
2026-11-04 20:44:00 +00:00
parent 5443602d89
commit a9315c55fb
53 changed files with 1750 additions and 183 deletions

View File

@@ -6,7 +6,7 @@ This sample demonstrates peer-to-peer (P2P) memory access between multiple GPUs
## What you will learn
- How to detect multiple CUDA-capable GPUs using `system.get_num_devices()` and `Device(id)`
- How to detect multiple CUDA-capable GPUs using `Device.get_all_devices()`
- How to check P2P capability between GPU pairs using `device.can_access_peer()`
- How to enable and disable peer access using `DeviceMemoryResource.peer_accessible_by`
- How to allocate device memory on specific GPUs using `DeviceMemoryResource`
@@ -26,9 +26,7 @@ This sample demonstrates peer-to-peer (P2P) memory access between multiple GPUs
## Key APIs
**From cuda.core:**
- `system` – Pre-instantiated singleton for system-level CUDA information
- `system.get_num_devices()` – Get number of CUDA-capable devices
- `Device(id)` – Get specific CUDA device handle
- `Device.get_all_devices()` – Get handles for all CUDA-visible devices
- `device.can_access_peer(peer)` – Check if this device can access peer device memory
- `device.set_current()` – Set active device for subsequent operations
- `device.create_stream()` – Create CUDA stream for kernel execution
@@ -94,7 +92,7 @@ pip install -r requirements.txt
Or manually:
```bash
pip install numpy>=2.3.2 cuda-core>=1.0.0 cuda-python>=13.0.0
pip install numpy>=2.3.2 cuda-core>=1.2.0 cuda-python>=13.0.0
```
## How to run