mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-11-17 17:38:18 +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:
@@ -33,13 +33,24 @@ Pick a CuPy wheel that matches your CUDA major version (e.g. `cupy-cuda13x` in `
|
||||
|
||||
## How to run
|
||||
|
||||
**`--cuda-include-dir` is required** (colon-separated list). Typical desktop layout:
|
||||
**`--cuda-include-dir` is required.** Multiple paths can be combined using the
|
||||
OS path separator (`:` on Linux/macOS, `;` on Windows).
|
||||
|
||||
Linux / macOS:
|
||||
|
||||
```bash
|
||||
python reductionMultiBlockCG.py \
|
||||
--cuda-include-dir /usr/local/cuda/include/cccl:/usr/local/cuda/include
|
||||
```
|
||||
|
||||
Windows (PowerShell or cmd, note the `;` separator and quotes around the
|
||||
combined value):
|
||||
|
||||
```powershell
|
||||
python reductionMultiBlockCG.py `
|
||||
--cuda-include-dir "$env:CUDA_PATH\include;$env:CUDA_PATH\include\cccl"
|
||||
```
|
||||
|
||||
**Jetson / split include trees:** pass every directory NVRTC needs in one `--cuda-include-dir` argument, e.g.
|
||||
`/usr/local/cuda/include/cccl:/usr/local/cuda/targets/sbsa-linux/include` (adjust paths to your image). If headers are scattered, you can instead merge them into one tree with symlinks and point `--cuda-include-dir` at that folder.
|
||||
|
||||
@@ -94,15 +105,15 @@ Summary
|
||||
======================================================================
|
||||
|
||||
Single-kernel two-stage reduction:
|
||||
Stage 1: 20 blocks → 20 partial sums
|
||||
grid.sync() ← All blocks synchronize (KEY innovation)
|
||||
Stage 2: Block 0 → 1 final result
|
||||
Stage 1: 20 blocks -> 20 partial sums
|
||||
grid.sync() <- All blocks synchronize (KEY innovation)
|
||||
Stage 2: Block 0 -> 1 final result
|
||||
Total: 1 kernel launch, 137.35 GB/s
|
||||
|
||||
Comparison:
|
||||
• Traditional: 2 kernel launches or kernel + CPU
|
||||
• This sample: 1 kernel with grid.sync() between stages
|
||||
• Benefit: Eliminates ~5-20μs launch overhead per stage
|
||||
• Benefit: Eliminates ~5-20us launch overhead per stage
|
||||
|
||||
======================================================================
|
||||
Single-Pass Multi-Block Reduction completed successfully!
|
||||
|
||||
Reference in New Issue
Block a user