From 203703f5e5d1a39e813355a1557555a09d38cccd Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Tue, 20 Oct 2026 10:05:08 -0700 Subject: [PATCH 1/2] samples: refresh PyTorch, TensorFlow, and Pillow requirements Raise the sample minimums to PyTorch 2.14.1, TensorFlow 2.21.0, and Pillow 13.0.0. Apply the Pillow floor to the Matplotlib sample, and synchronize inline dependency metadata and documentation. Signed-off-by: Keith Kraus --- samples/cuda_bindings/extra/isoFdModelling/README.md | 1 + samples/cuda_bindings/extra/isoFdModelling/requirements.txt | 2 ++ samples/cuda_core/blurImageUnifiedMemory/README.md | 2 +- .../blurImageUnifiedMemory/blurImageUnifiedMemory.py | 2 +- samples/cuda_core/blurImageUnifiedMemory/requirements.txt | 2 +- samples/cuda_core/customPyTorchKernel/README.md | 6 +++--- .../cuda_core/customPyTorchKernel/customPyTorchKernel.py | 2 +- samples/cuda_core/customPyTorchKernel/requirements.txt | 4 ++-- samples/cuda_core/customTensorFlowKernel/README.md | 2 +- .../customTensorFlowKernel/customTensorFlowKernel.py | 2 +- samples/cuda_core/customTensorFlowKernel/requirements.txt | 4 ++-- 11 files changed, 16 insertions(+), 13 deletions(-) diff --git a/samples/cuda_bindings/extra/isoFdModelling/README.md b/samples/cuda_bindings/extra/isoFdModelling/README.md index 11226f81199..6289730b1e8 100644 --- a/samples/cuda_bindings/extra/isoFdModelling/README.md +++ b/samples/cuda_bindings/extra/isoFdModelling/README.md @@ -73,6 +73,7 @@ non-interactive run. - `cuda-python` (>=13.4.0) - `numpy` - `matplotlib` (optional) +- `pillow` (>=13.0.0, installed with Matplotlib) ## Installation diff --git a/samples/cuda_bindings/extra/isoFdModelling/requirements.txt b/samples/cuda_bindings/extra/isoFdModelling/requirements.txt index c4d2912d7fb..604ff6f8454 100644 --- a/samples/cuda_bindings/extra/isoFdModelling/requirements.txt +++ b/samples/cuda_bindings/extra/isoFdModelling/requirements.txt @@ -6,3 +6,5 @@ numpy>=1.24 # Required for the default wavefield display; pass --no-display for CI or # other non-interactive runs. matplotlib +# Matplotlib's image dependency. +pillow>=13.0.0 diff --git a/samples/cuda_core/blurImageUnifiedMemory/README.md b/samples/cuda_core/blurImageUnifiedMemory/README.md index 38549cd5fce..17a245df3b6 100644 --- a/samples/cuda_core/blurImageUnifiedMemory/README.md +++ b/samples/cuda_core/blurImageUnifiedMemory/README.md @@ -108,7 +108,7 @@ When returning a zero-copy view, the caller must close the buffers after use (e. - `cuda-python` package (13.0.0+) - `cuda-core` package (>=1.0.0) - `numpy` package (>=2.3.2) -- `pillow` package (10.0.0+) +- `pillow` package (13.0.0+) ### Platform Support: diff --git a/samples/cuda_core/blurImageUnifiedMemory/blurImageUnifiedMemory.py b/samples/cuda_core/blurImageUnifiedMemory/blurImageUnifiedMemory.py index 297ba7ed2a3..9731296360a 100644 --- a/samples/cuda_core/blurImageUnifiedMemory/blurImageUnifiedMemory.py +++ b/samples/cuda_core/blurImageUnifiedMemory/blurImageUnifiedMemory.py @@ -25,7 +25,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # /// script -# dependencies = ["cuda-python>=13.0.0", "cuda-core>=1.0.0", "numpy>=2.3.2", "pillow>=10.0.0"] +# dependencies = ["cuda-python>=13.0.0", "cuda-core>=1.0.0", "numpy>=2.3.2", "pillow>=13.0.0"] # /// """ diff --git a/samples/cuda_core/blurImageUnifiedMemory/requirements.txt b/samples/cuda_core/blurImageUnifiedMemory/requirements.txt index 5213dcc2546..c5af82e576e 100644 --- a/samples/cuda_core/blurImageUnifiedMemory/requirements.txt +++ b/samples/cuda_core/blurImageUnifiedMemory/requirements.txt @@ -3,4 +3,4 @@ cuda-python>=13.0.0 cuda-core>=1.0.0 numpy>=2.3.2 -pillow>=10.0.0 +pillow>=13.0.0 diff --git a/samples/cuda_core/customPyTorchKernel/README.md b/samples/cuda_core/customPyTorchKernel/README.md index defc05017a2..4b961eec185 100644 --- a/samples/cuda_core/customPyTorchKernel/README.md +++ b/samples/cuda_core/customPyTorchKernel/README.md @@ -9,7 +9,7 @@ This sample demonstrates how to add a custom GPU operation to PyTorch using the - NVIDIA GPU with Compute Capability 7.0+ - CUDA Toolkit 13.0+ - Python 3.11+ -- PyTorch 2.0+ +- PyTorch 2.14.1+ - cuda-python >= 13.0.0 - cuda-core >=1.0.0 @@ -23,10 +23,10 @@ pip install -r requirements.txt **Windows users:** The default `torch` wheel on PyPI for Windows is CPU-only and will cause `torch.cuda.is_available()` to return `False`. Install a CUDA-enabled build from PyTorch's wheel index *before* (or after) the command above: ```bash -pip install torch --index-url https://download.pytorch.org/whl/cu128 +pip install "torch>=2.14.1" --index-url https://download.pytorch.org/whl/cu130 ``` -Replace `cu128` with the wheel suffix matching your installed CUDA driver (e.g. `cu121`, `cu124`, `cu126`, `cu128`). The driver's CUDA version must be >= the wheel's bundled runtime. +Use the [PyTorch installation selector](https://pytorch.org/get-started/locally/) to choose a supported wheel for your platform. The driver's CUDA version must be >= the wheel's bundled runtime. ## How to Run diff --git a/samples/cuda_core/customPyTorchKernel/customPyTorchKernel.py b/samples/cuda_core/customPyTorchKernel/customPyTorchKernel.py index b092bc94706..4d6a68f1f91 100644 --- a/samples/cuda_core/customPyTorchKernel/customPyTorchKernel.py +++ b/samples/cuda_core/customPyTorchKernel/customPyTorchKernel.py @@ -25,7 +25,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # /// script -# dependencies = ["cuda-python>=13.0.0", "cuda-core>=1.0.0", "torch>=2.0.0"] +# dependencies = ["cuda-python>=13.0.0", "cuda-core>=1.0.0", "torch>=2.14.1"] # /// """ diff --git a/samples/cuda_core/customPyTorchKernel/requirements.txt b/samples/cuda_core/customPyTorchKernel/requirements.txt index 001018fab75..93a4a31bdb6 100644 --- a/samples/cuda_core/customPyTorchKernel/requirements.txt +++ b/samples/cuda_core/customPyTorchKernel/requirements.txt @@ -3,8 +3,8 @@ # NOTE: On Windows, the default `torch` wheel from PyPI is CPU-only and the # sample will fail with "Torch not compiled with CUDA enabled". Install a # CUDA-enabled torch from PyTorch's wheel index first (see README.md): -# pip install torch --index-url https://download.pytorch.org/whl/cu128 +# pip install "torch>=2.14.1" --index-url https://download.pytorch.org/whl/cu130 cuda-python>=13.0.0 cuda-core>=1.0.0 -torch>=2.0.0 +torch>=2.14.1 diff --git a/samples/cuda_core/customTensorFlowKernel/README.md b/samples/cuda_core/customTensorFlowKernel/README.md index 98358970e80..21e3558364d 100644 --- a/samples/cuda_core/customTensorFlowKernel/README.md +++ b/samples/cuda_core/customTensorFlowKernel/README.md @@ -20,7 +20,7 @@ Learn how to add a custom GPU operation to TensorFlow using `cuda.core` with `tf - NVIDIA GPU with Compute Capability 7.0+ - CUDA Toolkit 13.0+ - Python 3.11+ -- TensorFlow 2.10+ +- TensorFlow 2.21+ - cuda-python >= 13.0.0 - cuda-core >=1.0.0 (required for LEGACY_DEFAULT_STREAM) - numpy >= 2.3.2 diff --git a/samples/cuda_core/customTensorFlowKernel/customTensorFlowKernel.py b/samples/cuda_core/customTensorFlowKernel/customTensorFlowKernel.py index 8b4c1c05c3e..186bcfe293d 100644 --- a/samples/cuda_core/customTensorFlowKernel/customTensorFlowKernel.py +++ b/samples/cuda_core/customTensorFlowKernel/customTensorFlowKernel.py @@ -25,7 +25,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # /// script -# dependencies = ["numpy>=2.3.2", "tensorflow>=2.10.0", "cupy-cuda13x>=14.0.0", "cuda-python>=13.0.0", "cuda-core>=1.0.0"] +# dependencies = ["numpy>=2.3.2", "tensorflow>=2.21.0", "cupy-cuda13x>=14.0.0", "cuda-python>=13.0.0", "cuda-core>=1.0.0"] # /// """ diff --git a/samples/cuda_core/customTensorFlowKernel/requirements.txt b/samples/cuda_core/customTensorFlowKernel/requirements.txt index ff4c4229de8..fd29cf12775 100644 --- a/samples/cuda_core/customTensorFlowKernel/requirements.txt +++ b/samples/cuda_core/customTensorFlowKernel/requirements.txt @@ -2,13 +2,13 @@ # # This sample demonstrates a cuda.core-first approach: # - cuda-python and cuda-core: Primary GPU management (device, stream, kernel) -# - TensorFlow 2.10+: Deep learning framework (tf.py_function, tf.custom_gradient) +# - TensorFlow 2.21+: Deep learning framework (tf.py_function, tf.custom_gradient) # - CuPy: Internal helper for device pointer access only # # Note: cuda-core>=1.0.0 is required for LEGACY_DEFAULT_STREAM constant numpy>=2.3.2 -tensorflow>=2.10.0 +tensorflow>=2.21.0 cupy-cuda13x>=14.0.0 cuda-python>=13.0.0 cuda-core>=1.0.0 From 8cc35b5e53aed36375f02cb95e904ee010d326bb Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Tue, 20 Oct 2026 10:14:46 -0700 Subject: [PATCH 2/2] samples: remove indirect Pillow requirement from isoFdModelling Keep the sample requirements limited to direct dependencies. Matplotlib already installs Pillow for its optional wavefield display. Signed-off-by: Keith Kraus --- samples/cuda_bindings/extra/isoFdModelling/README.md | 1 - samples/cuda_bindings/extra/isoFdModelling/requirements.txt | 2 -- 2 files changed, 3 deletions(-) diff --git a/samples/cuda_bindings/extra/isoFdModelling/README.md b/samples/cuda_bindings/extra/isoFdModelling/README.md index 6289730b1e8..11226f81199 100644 --- a/samples/cuda_bindings/extra/isoFdModelling/README.md +++ b/samples/cuda_bindings/extra/isoFdModelling/README.md @@ -73,7 +73,6 @@ non-interactive run. - `cuda-python` (>=13.4.0) - `numpy` - `matplotlib` (optional) -- `pillow` (>=13.0.0, installed with Matplotlib) ## Installation diff --git a/samples/cuda_bindings/extra/isoFdModelling/requirements.txt b/samples/cuda_bindings/extra/isoFdModelling/requirements.txt index 604ff6f8454..c4d2912d7fb 100644 --- a/samples/cuda_bindings/extra/isoFdModelling/requirements.txt +++ b/samples/cuda_bindings/extra/isoFdModelling/requirements.txt @@ -6,5 +6,3 @@ numpy>=1.24 # Required for the default wavefield display; pass --no-display for CI or # other non-interactive runs. matplotlib -# Matplotlib's image dependency. -pillow>=13.0.0