mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-10-13 00:08:26 +08:00
Release v13.3 of the CUDA samples with CUDA 13.3 Toolkit (#435)
This is the release of the CUDA 13.3 samples, which include additions for CUDA Tile C++, and updated CCCL and Python samples.
This commit is contained in:
@@ -60,15 +60,27 @@ verified on the host.
|
||||
### Hardware
|
||||
|
||||
- NVIDIA GPU with Compute Capability 7.0 or higher
|
||||
- Managed memory support (most discrete GPUs on Linux and Windows)
|
||||
- Managed memory support (most discrete GPUs)
|
||||
|
||||
### Software
|
||||
|
||||
- CUDA Toolkit 13.0 or newer (matches `cuda-python` 13.x)
|
||||
- Python 3.10 or newer
|
||||
- `cuda-python` (>=13.0.0)
|
||||
- `cuda-core` (>=0.6.0)
|
||||
- `cupy-cuda13x` (>=13.0.0)
|
||||
- `cuda-core` (>=1.0.0)
|
||||
- `cupy-cuda13x` (>=14.0.0)
|
||||
|
||||
### Platform Support
|
||||
|
||||
The `ManagedMemoryResource` demo in this sample exercises **concurrent host
|
||||
access** to managed allocations while the GPU is active, which requires the
|
||||
device property `concurrent_managed_access=True`. This is only supported on
|
||||
Linux with HMM (Pascal and newer). On Windows (WDDM/MCDM/TCC) the property
|
||||
is `False`, so the sample exits early with a waive message and exit code
|
||||
`2`. The `DeviceMemoryResource` + `PinnedMemoryResource` demos in this
|
||||
sample would still work on Windows on their own, but to keep the sample
|
||||
self-contained the entire script waives when concurrent managed access is
|
||||
unavailable.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -82,8 +94,8 @@ pip install -r requirements.txt
|
||||
The `requirements.txt` installs:
|
||||
|
||||
- `cuda-python` (>=13.0.0)
|
||||
- `cuda-core` (>=0.6.0)
|
||||
- `cupy-cuda13x` (>=13.0.0)
|
||||
- `cuda-core` (>=1.0.0)
|
||||
- `cupy-cuda13x` (>=14.0.0)
|
||||
|
||||
## How to Run
|
||||
|
||||
|
||||
@@ -165,9 +165,9 @@ def demo_managed(device, stream, kernel, size):
|
||||
stream.sync()
|
||||
|
||||
# No explicit copy: the same numpy view observes the GPU's writes.
|
||||
assert np.allclose(managed_view, original * 0.5 + 10.0), (
|
||||
"Managed memory result mismatch"
|
||||
)
|
||||
assert np.allclose(
|
||||
managed_view, original * 0.5 + 10.0
|
||||
), "Managed memory result mismatch"
|
||||
print(" GPU writes observed directly through the host-visible mapping")
|
||||
finally:
|
||||
managed_buffer.close(stream)
|
||||
@@ -222,6 +222,14 @@ def main():
|
||||
parser.add_argument("--device", type=int, default=0, help="CUDA device id")
|
||||
args = parser.parse_args()
|
||||
|
||||
if sys.platform == "win32":
|
||||
print(
|
||||
"This sample relies on ManagedMemoryResource with concurrent host "
|
||||
"access, which is not supported on Windows "
|
||||
"(concurrent_managed_access=False). Waiving this sample."
|
||||
)
|
||||
sys.exit(2)
|
||||
|
||||
device = Device(args.device)
|
||||
device.set_current()
|
||||
print_gpu_info(device)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Memory Resources Sample Requirements
|
||||
|
||||
cuda-python>=13.0.0
|
||||
cuda-core>=0.6.0
|
||||
cupy-cuda13x>=13.0.0
|
||||
cuda-core>=1.0.0
|
||||
cupy-cuda13x>=14.0.0
|
||||
|
||||
Reference in New Issue
Block a user