From c0212e36d48e2678597768b714afaa640acd3bd8 Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Mon, 4 Aug 2025 16:40:05 +0000 Subject: [PATCH 1/4] remove trampoline modules --- cuda_bindings/cuda/ccuda.pxd | 15 --------------- cuda_bindings/cuda/ccuda.pyx | 7 ------- cuda_bindings/cuda/ccudart.pxd | 15 --------------- cuda_bindings/cuda/ccudart.pyx | 7 ------- cuda_bindings/cuda/cnvrtc.pxd | 15 --------------- cuda_bindings/cuda/cnvrtc.pyx | 7 ------- cuda_bindings/cuda/cuda.pyx | 22 ---------------------- cuda_bindings/cuda/cudart.pyx | 22 ---------------------- cuda_bindings/cuda/nvrtc.pyx | 22 ---------------------- cuda_bindings/setup.py | 2 -- 10 files changed, 134 deletions(-) delete mode 100644 cuda_bindings/cuda/ccuda.pxd delete mode 100644 cuda_bindings/cuda/ccuda.pyx delete mode 100644 cuda_bindings/cuda/ccudart.pxd delete mode 100644 cuda_bindings/cuda/ccudart.pyx delete mode 100644 cuda_bindings/cuda/cnvrtc.pxd delete mode 100644 cuda_bindings/cuda/cnvrtc.pyx delete mode 100644 cuda_bindings/cuda/cuda.pyx delete mode 100644 cuda_bindings/cuda/cudart.pyx delete mode 100644 cuda_bindings/cuda/nvrtc.pyx diff --git a/cuda_bindings/cuda/ccuda.pxd b/cuda_bindings/cuda/ccuda.pxd deleted file mode 100644 index 33920d37db..0000000000 --- a/cuda_bindings/cuda/ccuda.pxd +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -from cuda.bindings.cydriver cimport * - -cdef extern from *: - """ - #ifdef _MSC_VER - #pragma message ( "The cuda.ccuda module is deprecated and will be removed in a future release, " \ - "please switch to use the cuda.bindings.cydriver module instead." ) - #else - #warning The cuda.ccuda module is deprecated and will be removed in a future release, \ - please switch to use the cuda.bindings.cydriver module instead. - #endif - """ diff --git a/cuda_bindings/cuda/ccuda.pyx b/cuda_bindings/cuda/ccuda.pyx deleted file mode 100644 index 668c003795..0000000000 --- a/cuda_bindings/cuda/ccuda.pyx +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -from cuda.bindings.cydriver cimport * -from cuda.bindings import cydriver -__pyx_capi__ = cydriver.__pyx_capi__ -del cydriver diff --git a/cuda_bindings/cuda/ccudart.pxd b/cuda_bindings/cuda/ccudart.pxd deleted file mode 100644 index fa1adaff80..0000000000 --- a/cuda_bindings/cuda/ccudart.pxd +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -from cuda.bindings.cyruntime cimport * - -cdef extern from *: - """ - #ifdef _MSC_VER - #pragma message ( "The cuda.ccudart module is deprecated and will be removed in a future release, " \ - "please switch to use the cuda.bindings.cyruntime module instead." ) - #else - #warning The cuda.ccudart module is deprecated and will be removed in a future release, \ - please switch to use the cuda.bindings.cyruntime module instead. - #endif - """ diff --git a/cuda_bindings/cuda/ccudart.pyx b/cuda_bindings/cuda/ccudart.pyx deleted file mode 100644 index 4dc06b2507..0000000000 --- a/cuda_bindings/cuda/ccudart.pyx +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -from cuda.bindings.cyruntime cimport * -from cuda.bindings import cyruntime -__pyx_capi__ = cyruntime.__pyx_capi__ -del cyruntime diff --git a/cuda_bindings/cuda/cnvrtc.pxd b/cuda_bindings/cuda/cnvrtc.pxd deleted file mode 100644 index 032846b8d9..0000000000 --- a/cuda_bindings/cuda/cnvrtc.pxd +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -from cuda.bindings.cynvrtc cimport * - -cdef extern from *: - """ - #ifdef _MSC_VER - #pragma message ( "The cuda.cnvrtc module is deprecated and will be removed in a future release, " \ - "please switch to use the cuda.bindings.cynvrtc module instead." ) - #else - #warning The cuda.cnvrtc module is deprecated and will be removed in a future release, \ - please switch to use the cuda.bindings.cynvrtc module instead. - #endif - """ diff --git a/cuda_bindings/cuda/cnvrtc.pyx b/cuda_bindings/cuda/cnvrtc.pyx deleted file mode 100644 index 391a1c0bd9..0000000000 --- a/cuda_bindings/cuda/cnvrtc.pyx +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -from cuda.bindings.cynvrtc cimport * -from cuda.bindings import cynvrtc -__pyx_capi__ = cynvrtc.__pyx_capi__ -del cynvrtc diff --git a/cuda_bindings/cuda/cuda.pyx b/cuda_bindings/cuda/cuda.pyx deleted file mode 100644 index 8a1c13ddd0..0000000000 --- a/cuda_bindings/cuda/cuda.pyx +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -import warnings as _warnings - -from cuda.bindings.driver import * - - -cdef extern from *: - """ - #ifdef _MSC_VER - #pragma message ( "The cuda.cuda module is deprecated and will be removed in a future release, " \ - "please switch to use the cuda.bindings.driver module instead." ) - #else - #warning The cuda.cuda module is deprecated and will be removed in a future release, \ - please switch to use the cuda.bindings.driver module instead. - #endif - """ - - -_warnings.warn("The cuda.cuda module is deprecated and will be removed in a future release, " - "please switch to use the cuda.bindings.driver module instead.", FutureWarning, stacklevel=2) diff --git a/cuda_bindings/cuda/cudart.pyx b/cuda_bindings/cuda/cudart.pyx deleted file mode 100644 index e3232975a0..0000000000 --- a/cuda_bindings/cuda/cudart.pyx +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -import warnings as _warnings - -from cuda.bindings.runtime import * - - -cdef extern from *: - """ - #ifdef _MSC_VER - #pragma message ( "The cuda.cudart module is deprecated and will be removed in a future release, " \ - "please switch to use the cuda.bindings.runtime module instead." ) - #else - #warning The cuda.cudart module is deprecated and will be removed in a future release, \ - please switch to use the cuda.bindings.runtime module instead. - #endif - """ - - -_warnings.warn("The cuda.cudart module is deprecated and will be removed in a future release, " - "please switch to use the cuda.bindings.runtime module instead.", FutureWarning, stacklevel=2) diff --git a/cuda_bindings/cuda/nvrtc.pyx b/cuda_bindings/cuda/nvrtc.pyx deleted file mode 100644 index 96b907069c..0000000000 --- a/cuda_bindings/cuda/nvrtc.pyx +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -import warnings as _warnings - -from cuda.bindings.nvrtc import * - - -cdef extern from *: - """ - #ifdef _MSC_VER - #pragma message ( "The cuda.nvrtc module is deprecated and will be removed in a future release, " \ - "please switch to use the cuda.bindings.nvrtc module instead." ) - #else - #warning The cuda.nvrtc module is deprecated and will be removed in a future release, \ - please switch to use the cuda.bindings.nvrtc module instead. - #endif - """ - - -_warnings.warn("The cuda.nvrtc module is deprecated and will be removed in a future release, " - "please switch to use the cuda.bindings.nvrtc module instead.", FutureWarning, stacklevel=2) diff --git a/cuda_bindings/setup.py b/cuda_bindings/setup.py index 128220371a..28967f7f3b 100644 --- a/cuda_bindings/setup.py +++ b/cuda_bindings/setup.py @@ -346,8 +346,6 @@ def do_cythonize(extensions): (["cuda/bindings/utils/*.pyx"], None), # public *(([f], None) for f in cuda_bindings_files), - # public (deprecated, to be removed) - (["cuda/*.pyx"], None), # internal files used by generated bindings (["cuda/bindings/_internal/utils.pyx"], None), *(([f], None) for f in dst_files if f.endswith(".pyx")), From 0ff9250f51dc0b24756d130cce30af117f7368fc Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Mon, 4 Aug 2025 16:40:34 +0000 Subject: [PATCH 2/4] try to also clean up MANIFEST.in --- cuda_bindings/MANIFEST.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cuda_bindings/MANIFEST.in b/cuda_bindings/MANIFEST.in index a98aa53f22..6e4c34d920 100644 --- a/cuda_bindings/MANIFEST.in +++ b/cuda_bindings/MANIFEST.in @@ -2,7 +2,3 @@ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE recursive-include cuda/ *.pyx *.pxd *.pxi -# at least with setuptools 75.0.0 this folder was added erroneously -# to the payload, causing file copying to the build environment failed -exclude cuda/bindings cuda?bindings -exclude cuda/bindings/_bindings cuda?bindings?_bindings From a9065cf6d9d6568a1b219a4c413e50d5126a10fb Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Wed, 6 Aug 2025 15:37:47 +0000 Subject: [PATCH 3/4] Revert "try to also clean up MANIFEST.in" This reverts commit 0ff9250f51dc0b24756d130cce30af117f7368fc. --- cuda_bindings/MANIFEST.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cuda_bindings/MANIFEST.in b/cuda_bindings/MANIFEST.in index 6e4c34d920..a98aa53f22 100644 --- a/cuda_bindings/MANIFEST.in +++ b/cuda_bindings/MANIFEST.in @@ -2,3 +2,7 @@ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE recursive-include cuda/ *.pyx *.pxd *.pxi +# at least with setuptools 75.0.0 this folder was added erroneously +# to the payload, causing file copying to the build environment failed +exclude cuda/bindings cuda?bindings +exclude cuda/bindings/_bindings cuda?bindings?_bindings From 6a3ad7117a49aa37a628db89ae7e3a0723aac8a8 Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Wed, 6 Aug 2025 15:41:57 +0000 Subject: [PATCH 4/4] add release notes --- cuda_bindings/docs/source/release/13.0.0-notes.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cuda_bindings/docs/source/release/13.0.0-notes.rst b/cuda_bindings/docs/source/release/13.0.0-notes.rst index 3df3ca48ad..b80c5d7bb5 100644 --- a/cuda_bindings/docs/source/release/13.0.0-notes.rst +++ b/cuda_bindings/docs/source/release/13.0.0-notes.rst @@ -30,6 +30,13 @@ Highlights released before calling the underlying C APIs. +Breaking changes +---------------- + +* For breaking changes in the CUDA APIs, please see the `CUDA 13.0 release notes `_. +* The trampoline modules ``cuda.{cuda,cudart,nvrtc}`` are now removed. Users should switch to use ``cuda.bindings.{driver,runtime,nvrtc}`` instead. + + Bug fixes ---------