diff --git a/.github/copy-pr-bot.yaml b/.github/copy-pr-bot.yaml index 2771228b7..1c459569a 100644 --- a/.github/copy-pr-bot.yaml +++ b/.github/copy-pr-bot.yaml @@ -1,3 +1,6 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: Apache-2.0 + # Configuration file for `copy-pr-bot` GitHub App # https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ec80a39a..a7112246a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,6 +19,16 @@ repos: - id: ruff args: [--fix, --show-fixes] - id: ruff-format + + - repo: local + hooks: + - id: check-spdx + name: Check SPDX-License-Identifier + entry: python ./toolshed/check_spdx.py + language: python + additional_dependencies: + - https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl + - repo: https://github.com/PyCQA/bandit rev: 8ff25e07e487f143571cc305e56dd0253c60bc7b #v1.8.3 hooks: diff --git a/.spdx-ignore b/.spdx-ignore new file mode 100644 index 000000000..60435ebb5 --- /dev/null +++ b/.spdx-ignore @@ -0,0 +1,13 @@ +LICENSE +*.html +*.json +*.md +*.png +.gitattributes +.gitignore +.github/BACKPORT_BRANCH +requirements*.txt +cuda_bindings/examples/* + +# Vendored +cuda_core/cuda/core/experimental/dlpack.h diff --git a/cuda_bindings/MANIFEST.in b/cuda_bindings/MANIFEST.in index 9527072c8..b340c74ab 100644 --- a/cuda_bindings/MANIFEST.in +++ b/cuda_bindings/MANIFEST.in @@ -1,3 +1,6 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# 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 diff --git a/cuda_bindings/benchmarks/conftest.py b/cuda_bindings/benchmarks/conftest.py index e1d72d26d..971501166 100644 --- a/cuda_bindings/benchmarks/conftest.py +++ b/cuda_bindings/benchmarks/conftest.py @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import numpy as np import pytest diff --git a/cuda_bindings/benchmarks/kernels.py b/cuda_bindings/benchmarks/kernels.py index 119727b2d..d5857eadd 100644 --- a/cuda_bindings/benchmarks/kernels.py +++ b/cuda_bindings/benchmarks/kernels.py @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + kernel_string = """\ #define ITEM_PARAM(x, T) T x #define REP1(x, T) , ITEM_PARAM(x, T) diff --git a/cuda_bindings/benchmarks/pytest.ini b/cuda_bindings/benchmarks/pytest.ini index a74acd3e2..d7b4769db 100644 --- a/cuda_bindings/benchmarks/pytest.ini +++ b/cuda_bindings/benchmarks/pytest.ini @@ -1,3 +1,6 @@ +# Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + [pytest] required_plugins = pytest-benchmark addopts = --benchmark-skip diff --git a/cuda_bindings/benchmarks/test_cupy.py b/cuda_bindings/benchmarks/test_cupy.py index 68fdd9831..33dfecbf8 100644 --- a/cuda_bindings/benchmarks/test_cupy.py +++ b/cuda_bindings/benchmarks/test_cupy.py @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import ctypes import pytest diff --git a/cuda_bindings/benchmarks/test_launch_latency.py b/cuda_bindings/benchmarks/test_launch_latency.py index 7af5f84cc..e79542c04 100755 --- a/cuda_bindings/benchmarks/test_launch_latency.py +++ b/cuda_bindings/benchmarks/test_launch_latency.py @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import ctypes import pytest diff --git a/cuda_bindings/benchmarks/test_numba.py b/cuda_bindings/benchmarks/test_numba.py index 36361d351..49035e0cd 100644 --- a/cuda_bindings/benchmarks/test_numba.py +++ b/cuda_bindings/benchmarks/test_numba.py @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import numpy as np import pytest diff --git a/cuda_bindings/benchmarks/test_pointer_attributes.py b/cuda_bindings/benchmarks/test_pointer_attributes.py index 5c9dbc2b6..ecaaa8db5 100644 --- a/cuda_bindings/benchmarks/test_pointer_attributes.py +++ b/cuda_bindings/benchmarks/test_pointer_attributes.py @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import random import pytest diff --git a/cuda_bindings/cuda/bindings/__init__.py b/cuda_bindings/cuda/bindings/__init__.py index 2bde5f72e..8086b4f6f 100644 --- a/cuda_bindings/cuda/bindings/__init__.py +++ b/cuda_bindings/cuda/bindings/__init__.py @@ -1,9 +1,4 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE from cuda.bindings._version import __version__ diff --git a/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in index 2179a10bd..a5aadc37b 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from cuda.bindings.cydriver cimport * diff --git a/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in index 44233c5b4..f5e8ead80 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in @@ -1,22 +1,14 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. {{if 'Windows' == platform.system()}} import os -import site -import struct import win32api from pywintypes import error {{else}} cimport cuda.bindings._lib.dlfcn as dlfcn {{endif}} - from libc.stdint cimport intptr_t import os import sys diff --git a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in index b45bdde3c..058101c94 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from cuda.bindings.cynvrtc cimport * diff --git a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in index 81283084f..b6b896765 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. {{if 'Windows' == platform.system()}} import os @@ -15,7 +10,6 @@ cimport cuda.bindings._lib.dlfcn as dlfcn from libc.stdint cimport uintptr_t {{endif}} from cuda.bindings import path_finder - from libc.stdint cimport intptr_t cdef bint __cuPythonInit = False diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in index aef8a71b2..ee6e70215 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. include "../cyruntime_types.pxi" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in index db5d7ada9..d1636bbbd 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. include "../cyruntime_functions.pxi" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in index f46087700..b4745b5c4 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cdef extern from "": """ diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in index 6bfefac5c..3ddab4e55 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cdef extern from "": """ diff --git a/cuda_bindings/cuda/bindings/_bindings/loader.cpp b/cuda_bindings/cuda/bindings/_bindings/loader.cpp index b2477fef3..e80c5574d 100644 --- a/cuda_bindings/cuda/bindings/_bindings/loader.cpp +++ b/cuda_bindings/cuda/bindings/_bindings/loader.cpp @@ -1,10 +1,6 @@ // Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -// -// Please refer to the NVIDIA end user license agreement (EULA) associated -// with this source code for terms and conditions that govern your use of -// this software. Any use, reproduction, disclosure, or distribution of -// this software and related documentation outside the terms of the EULA -// is strictly prohibited. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + #include #include #include diff --git a/cuda_bindings/cuda/bindings/_bindings/loader.h b/cuda_bindings/cuda/bindings/_bindings/loader.h index 2963d9e0d..eb9783bb5 100644 --- a/cuda_bindings/cuda/bindings/_bindings/loader.h +++ b/cuda_bindings/cuda/bindings/_bindings/loader.h @@ -1,4 +1,5 @@ // Copyright 2021-2024 NVIDIA Corporation. All rights reserved. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE // // Please refer to the NVIDIA end user license agreement (EULA) associated // with this source code for terms and conditions that govern your use of diff --git a/cuda_bindings/cuda/bindings/_bindings/loader.pxd b/cuda_bindings/cuda/bindings/_bindings/loader.pxd index 171515809..4310f14e7 100644 --- a/cuda_bindings/cuda/bindings/_bindings/loader.pxd +++ b/cuda_bindings/cuda/bindings/_bindings/loader.pxd @@ -1,10 +1,5 @@ - # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + cdef extern from "loader.h": int getCUDALibraryPath(char *libPath, bint isBit64) diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in index 6a8101e3a..044eeaece 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + from cuda.bindings.cyruntime cimport * # These graphics API are the reimplemented version of what's supported by CUDA Runtime. diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in index 0f2685b99..6337894bf 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + from cuda.bindings.cyruntime cimport * from cuda.bindings._lib.cyruntime.utils cimport * from libc.string cimport memset diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pxd.in b/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pxd.in index eb3612522..a4efc67f0 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pxd.in +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pxd.in @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + from cuda.bindings.cyruntime cimport * cimport cuda.bindings._bindings.cydriver as cydriver diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in b/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in index abe1d9940..65766c671 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in @@ -1,10 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import cython from cuda.bindings.cyruntime cimport * from libc.string cimport memset diff --git a/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd b/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd index 808c7186c..21207a969 100644 --- a/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd +++ b/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + cdef extern from "" nogil: void *dlopen(const char *, int) char *dlerror() @@ -15,4 +11,4 @@ cdef extern from "" nogil: RTLD_LAZY RTLD_NOW RTLD_GLOBAL - RTLD_LOCAL \ No newline at end of file + RTLD_LOCAL diff --git a/cuda_bindings/cuda/bindings/_lib/param_packer.cpp b/cuda_bindings/cuda/bindings/_lib/param_packer.cpp index 63386a177..648b7fda0 100644 --- a/cuda_bindings/cuda/bindings/_lib/param_packer.cpp +++ b/cuda_bindings/cuda/bindings/_lib/param_packer.cpp @@ -1,10 +1,6 @@ // Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -// -// Please refer to the NVIDIA end user license agreement (EULA) associated -// with this source code for terms and conditions that govern your use of -// this software. Any use, reproduction, disclosure, or distribution of -// this software and related documentation outside the terms of the EULA -// is strictly prohibited. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + #include #include "param_packer.h" diff --git a/cuda_bindings/cuda/bindings/_lib/param_packer.h b/cuda_bindings/cuda/bindings/_lib/param_packer.h index 2dfa4deb6..b9a957af0 100644 --- a/cuda_bindings/cuda/bindings/_lib/param_packer.h +++ b/cuda_bindings/cuda/bindings/_lib/param_packer.h @@ -1,4 +1,5 @@ // Copyright 2021-2024 NVIDIA Corporation. All rights reserved. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE // // Please refer to the NVIDIA end user license agreement (EULA) associated // with this source code for terms and conditions that govern your use of diff --git a/cuda_bindings/cuda/bindings/_lib/param_packer.pxd b/cuda_bindings/cuda/bindings/_lib/param_packer.pxd index 440006f57..bfe2f426a 100644 --- a/cuda_bindings/cuda/bindings/_lib/param_packer.pxd +++ b/cuda_bindings/cuda/bindings/_lib/param_packer.pxd @@ -1,9 +1,5 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + cdef extern from "param_packer.h": int feed(void* ptr, object o, object ct) diff --git a/cuda_bindings/cuda/bindings/_lib/utils.pxd.in b/cuda_bindings/cuda/bindings/_lib/utils.pxd.in index d8f6b790b..a67bdfda1 100644 --- a/cuda_bindings/cuda/bindings/_lib/utils.pxd.in +++ b/cuda_bindings/cuda/bindings/_lib/utils.pxd.in @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + cimport cuda.bindings.driver as driver cimport cuda.bindings.cydriver as cydriver cimport cuda.bindings.cyruntime as cyruntime diff --git a/cuda_bindings/cuda/bindings/_lib/utils.pyx.in b/cuda_bindings/cuda/bindings/_lib/utils.pyx.in index fdcaafd2c..ed85149b3 100644 --- a/cuda_bindings/cuda/bindings/_lib/utils.pyx.in +++ b/cuda_bindings/cuda/bindings/_lib/utils.pyx.in @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS from libc.stdlib cimport calloc, free from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/_version.py b/cuda_bindings/cuda/bindings/_version.py index 293274d14..645a0bf9c 100644 --- a/cuda_bindings/cuda/bindings/_version.py +++ b/cuda_bindings/cuda/bindings/_version.py @@ -1,9 +1,4 @@ # Copyright 2024-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE __version__ = "12.9.0" diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd.in b/cuda_bindings/cuda/bindings/cydriver.pxd.in index 68db6b032..7f0ffca84 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd.in +++ b/cuda_bindings/cuda/bindings/cydriver.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx.in b/cuda_bindings/cuda/bindings/cydriver.pyx.in index 7697f0dec..5b5752b39 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx.in +++ b/cuda_bindings/cuda/bindings/cydriver.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cimport cuda.bindings._bindings.cydriver as cydriver diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd.in b/cuda_bindings/cuda/bindings/cynvrtc.pxd.in index 7500078fb..a432f2155 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd.in +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx.in b/cuda_bindings/cuda/bindings/cynvrtc.pyx.in index 1d5cbae01..a19e081c3 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cimport cuda.bindings._bindings.cynvrtc as cynvrtc diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index 206089b58..83083ab6a 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index f1dc2b549..ae4ab76a1 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cimport cuda.bindings._bindings.cyruntime as cyruntime cimport cuda.bindings._lib.cyruntime.cyruntime as custom_cyruntime diff --git a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in index d323619ca..dd1513f48 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cdef extern from "cuda_runtime_api.h": diff --git a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in index 3198ce2bd..7ed8f6533 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cdef extern from "vector_types.h": diff --git a/cuda_bindings/cuda/bindings/driver.pxd.in b/cuda_bindings/cuda/bindings/driver.pxd.in index c45c34da0..6e73074fb 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd.in +++ b/cuda_bindings/cuda/bindings/driver.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver cimport cuda.bindings._lib.utils as utils diff --git a/cuda_bindings/cuda/bindings/driver.pyx.in b/cuda_bindings/cuda/bindings/driver.pyx.in index b8771dd30..a256ae453 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx.in +++ b/cuda_bindings/cuda/bindings/driver.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from typing import List, Tuple, Any, Optional from enum import IntEnum diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd.in b/cuda_bindings/cuda/bindings/nvrtc.pxd.in index e3dd52de0..07d2af343 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd.in +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cimport cuda.bindings.cynvrtc as cynvrtc cimport cuda.bindings._lib.utils as utils diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx.in b/cuda_bindings/cuda/bindings/nvrtc.pyx.in index 717e58a1e..9fcfff473 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from typing import List, Tuple, Any, Optional from enum import IntEnum diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index a6f56b452..83987c8fb 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime cimport cuda.bindings._lib.utils as utils diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index c3b8aa6f2..4e36cce1e 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,11 +1,6 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. -# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # This code was automatically generated with version 12.9.0. Do not modify it directly. from typing import List, Tuple, Any, Optional from enum import IntEnum diff --git a/cuda_bindings/cuda/ccuda.pxd b/cuda_bindings/cuda/ccuda.pxd index 2a0f2672f..57a5f476f 100644 --- a/cuda_bindings/cuda/ccuda.pxd +++ b/cuda_bindings/cuda/ccuda.pxd @@ -1,3 +1,6 @@ +# 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 *: diff --git a/cuda_bindings/cuda/ccuda.pyx b/cuda_bindings/cuda/ccuda.pyx index 0ad01d58f..187ed5746 100644 --- a/cuda_bindings/cuda/ccuda.pyx +++ b/cuda_bindings/cuda/ccuda.pyx @@ -1,3 +1,6 @@ +# 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__ diff --git a/cuda_bindings/cuda/ccudart.pxd b/cuda_bindings/cuda/ccudart.pxd index f7c3def5d..46e121f10 100644 --- a/cuda_bindings/cuda/ccudart.pxd +++ b/cuda_bindings/cuda/ccudart.pxd @@ -1,3 +1,6 @@ +# 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 *: diff --git a/cuda_bindings/cuda/ccudart.pyx b/cuda_bindings/cuda/ccudart.pyx index 17b3c1ea8..e1a6d66d7 100644 --- a/cuda_bindings/cuda/ccudart.pyx +++ b/cuda_bindings/cuda/ccudart.pyx @@ -1,3 +1,6 @@ +# 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__ diff --git a/cuda_bindings/cuda/cnvrtc.pxd b/cuda_bindings/cuda/cnvrtc.pxd index ed8170713..5805b5ead 100644 --- a/cuda_bindings/cuda/cnvrtc.pxd +++ b/cuda_bindings/cuda/cnvrtc.pxd @@ -1,3 +1,6 @@ +# 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 *: diff --git a/cuda_bindings/cuda/cnvrtc.pyx b/cuda_bindings/cuda/cnvrtc.pyx index 319512fa5..2fb4e05df 100644 --- a/cuda_bindings/cuda/cnvrtc.pyx +++ b/cuda_bindings/cuda/cnvrtc.pyx @@ -1,3 +1,6 @@ +# 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__ diff --git a/cuda_bindings/cuda/cuda.pyx b/cuda_bindings/cuda/cuda.pyx index 981b62228..8d8228a92 100644 --- a/cuda_bindings/cuda/cuda.pyx +++ b/cuda_bindings/cuda/cuda.pyx @@ -1,3 +1,6 @@ +# 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 * diff --git a/cuda_bindings/cuda/cudart.pyx b/cuda_bindings/cuda/cudart.pyx index e3d2986bb..9dc238047 100644 --- a/cuda_bindings/cuda/cudart.pyx +++ b/cuda_bindings/cuda/cudart.pyx @@ -1,3 +1,6 @@ +# 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 * diff --git a/cuda_bindings/cuda/nvrtc.pyx b/cuda_bindings/cuda/nvrtc.pyx index 09ff61b8c..8e1f1d7c3 100644 --- a/cuda_bindings/cuda/nvrtc.pyx +++ b/cuda_bindings/cuda/nvrtc.pyx @@ -1,3 +1,6 @@ +# 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 * diff --git a/cuda_bindings/docs/Makefile b/cuda_bindings/docs/Makefile index 75f2ef6c2..f03265caf 100644 --- a/cuda_bindings/docs/Makefile +++ b/cuda_bindings/docs/Makefile @@ -1,3 +1,6 @@ +# Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # Minimal makefile for Sphinx documentation # diff --git a/cuda_bindings/docs/build_docs.sh b/cuda_bindings/docs/build_docs.sh index ffeece9da..1ed8bc6c5 100755 --- a/cuda_bindings/docs/build_docs.sh +++ b/cuda_bindings/docs/build_docs.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + set -ex if [[ "$#" == "0" ]]; then diff --git a/cuda_bindings/docs/make.bat b/cuda_bindings/docs/make.bat index 9534b0181..88e1803f4 100644 --- a/cuda_bindings/docs/make.bat +++ b/cuda_bindings/docs/make.bat @@ -1,5 +1,8 @@ @ECHO OFF +REM Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +REM SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + pushd %~dp0 REM Command file for Sphinx documentation diff --git a/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js b/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js index 29860a8f8..8d2d73e36 100644 --- a/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js +++ b/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + function change_current_version(event) { event.preventDefault(); diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index 5ea8b4443..699bb28ad 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -1,3 +1,6 @@ +# Copyright (c) 2012-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full diff --git a/cuda_bindings/pyproject.toml b/cuda_bindings/pyproject.toml index 875547033..e13dc015c 100644 --- a/cuda_bindings/pyproject.toml +++ b/cuda_bindings/pyproject.toml @@ -1,12 +1,5 @@ # Copyright 2023-2024 NVIDIA Corporation. All rights reserved. -# # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. [build-system] requires = ["setuptools>=77.0.0", "cython", "pyclibrary"] diff --git a/cuda_bindings/setup.py b/cuda_bindings/setup.py index 8b951b2e0..776a510cb 100644 --- a/cuda_bindings/setup.py +++ b/cuda_bindings/setup.py @@ -1,12 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. import atexit import contextlib diff --git a/cuda_bindings/site-packages/_cuda_bindings_redirector.pth b/cuda_bindings/site-packages/_cuda_bindings_redirector.pth index c8a1ca9e6..bac967c92 100644 --- a/cuda_bindings/site-packages/_cuda_bindings_redirector.pth +++ b/cuda_bindings/site-packages/_cuda_bindings_redirector.pth @@ -1 +1,4 @@ +# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import _cuda_bindings_redirector diff --git a/cuda_bindings/site-packages/_cuda_bindings_redirector.py b/cuda_bindings/site-packages/_cuda_bindings_redirector.py index c5e7a144a..af8706ff6 100644 --- a/cuda_bindings/site-packages/_cuda_bindings_redirector.py +++ b/cuda_bindings/site-packages/_cuda_bindings_redirector.py @@ -1,4 +1,5 @@ # Copyright 2025 NVIDIA Corporation. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE import sys from types import ModuleType diff --git a/cuda_bindings/tests/cython/build_tests.bat b/cuda_bindings/tests/cython/build_tests.bat index 69d157ca8..ac026268a 100644 --- a/cuda_bindings/tests/cython/build_tests.bat +++ b/cuda_bindings/tests/cython/build_tests.bat @@ -1,4 +1,8 @@ @echo off + +REM Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +REM SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + setlocal set CL=%CL% /I"%CUDA_HOME%\include" cythonize -3 -i %~dp0test_*.pyx diff --git a/cuda_bindings/tests/cython/build_tests.sh b/cuda_bindings/tests/cython/build_tests.sh index 82ef437c6..236151bfa 100755 --- a/cuda_bindings/tests/cython/build_tests.sh +++ b/cuda_bindings/tests/cython/build_tests.sh @@ -1,3 +1,6 @@ #!/bin/bash +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + CPLUS_INCLUDE_PATH=$CUDA_HOME/include:$CPLUS_INCLUDE_PATH cythonize -3 -i $(dirname "$0")/test_*.pyx diff --git a/cuda_bindings/tests/cython/test_ccuda.pyx b/cuda_bindings/tests/cython/test_ccuda.pyx index a2ade6056..49990dbfc 100644 --- a/cuda_bindings/tests/cython/test_ccuda.pyx +++ b/cuda_bindings/tests/cython/test_ccuda.pyx @@ -1,10 +1,5 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # distutils: language=c++ from libc.string cimport ( diff --git a/cuda_bindings/tests/cython/test_ccudart.pyx b/cuda_bindings/tests/cython/test_ccudart.pyx index aaa2f5d7a..b0267a0d4 100644 --- a/cuda_bindings/tests/cython/test_ccudart.pyx +++ b/cuda_bindings/tests/cython/test_ccudart.pyx @@ -1,10 +1,5 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # distutils: language=c++ from libc.string cimport ( diff --git a/cuda_bindings/tests/cython/test_cython.py b/cuda_bindings/tests/cython/test_cython.py index ed5069219..2f39699f1 100644 --- a/cuda_bindings/tests/cython/test_cython.py +++ b/cuda_bindings/tests/cython/test_cython.py @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import functools import importlib import sys diff --git a/cuda_bindings/tests/cython/test_interoperability_cython.pyx b/cuda_bindings/tests/cython/test_interoperability_cython.pyx index 89e36a4c6..38ea372ed 100644 --- a/cuda_bindings/tests/cython/test_interoperability_cython.pyx +++ b/cuda_bindings/tests/cython/test_interoperability_cython.pyx @@ -1,10 +1,5 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # distutils: language=c++ from libc.stdlib cimport calloc, free diff --git a/cuda_bindings/tests/pytest.ini b/cuda_bindings/tests/pytest.ini index 76f66832c..e96583e68 100644 --- a/cuda_bindings/tests/pytest.ini +++ b/cuda_bindings/tests/pytest.ini @@ -1,2 +1,5 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + [pytest] norecursedirs = cython diff --git a/cuda_bindings/tests/test_cuda.py b/cuda_bindings/tests/test_cuda.py index 8d8443e88..3ad670311 100644 --- a/cuda_bindings/tests/test_cuda.py +++ b/cuda_bindings/tests/test_cuda.py @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import platform import shutil import textwrap diff --git a/cuda_bindings/tests/test_cudart.py b/cuda_bindings/tests/test_cudart.py index f7eb1abb9..be5f217b9 100644 --- a/cuda_bindings/tests/test_cudart.py +++ b/cuda_bindings/tests/test_cudart.py @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import ctypes import math diff --git a/cuda_bindings/tests/test_interoperability.py b/cuda_bindings/tests/test_interoperability.py index 998535992..9105273b6 100644 --- a/cuda_bindings/tests/test_interoperability.py +++ b/cuda_bindings/tests/test_interoperability.py @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import numpy as np import pytest diff --git a/cuda_bindings/tests/test_kernelParams.py b/cuda_bindings/tests/test_kernelParams.py index c45bf46ab..8d17aba0f 100644 --- a/cuda_bindings/tests/test_kernelParams.py +++ b/cuda_bindings/tests/test_kernelParams.py @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import ctypes import numpy as np diff --git a/cuda_bindings/tests/test_nvrtc.py b/cuda_bindings/tests/test_nvrtc.py index 013d75f72..682e55f39 100644 --- a/cuda_bindings/tests/test_nvrtc.py +++ b/cuda_bindings/tests/test_nvrtc.py @@ -1,10 +1,6 @@ # Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + import pytest from cuda import nvrtc diff --git a/cuda_core/docs/Makefile b/cuda_core/docs/Makefile index 3f1222e89..12fea39af 100644 --- a/cuda_core/docs/Makefile +++ b/cuda_core/docs/Makefile @@ -1,3 +1,6 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: Apache-2.0 + # Minimal makefile for Sphinx documentation # diff --git a/cuda_core/docs/build_docs.sh b/cuda_core/docs/build_docs.sh index 2262278c9..a2cde9df9 100755 --- a/cuda_core/docs/build_docs.sh +++ b/cuda_core/docs/build_docs.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: Apache-2.0 + set -ex if [[ "$#" == "0" ]]; then diff --git a/cuda_core/docs/source/_static/javascripts/version_dropdown.js b/cuda_core/docs/source/_static/javascripts/version_dropdown.js index 29860a8f8..d9c633cf9 100644 --- a/cuda_core/docs/source/_static/javascripts/version_dropdown.js +++ b/cuda_core/docs/source/_static/javascripts/version_dropdown.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +// SPDX-License-Identifier: Apache-2.0 + function change_current_version(event) { event.preventDefault(); diff --git a/cuda_core/tests/conftest.py b/cuda_core/tests/conftest.py index 23bb0274e..b27a33676 100644 --- a/cuda_core/tests/conftest.py +++ b/cuda_core/tests/conftest.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 import glob import os diff --git a/cuda_core/tests/cython/build_tests.sh b/cuda_core/tests/cython/build_tests.sh index d85ccec77..3ffe61ef7 100755 --- a/cuda_core/tests/cython/build_tests.sh +++ b/cuda_core/tests/cython/build_tests.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: Apache-2.0 + SCRIPTPATH=$(dirname $(realpath "$0")) CPLUS_INCLUDE_PATH=$SCRIPTPATH/../../cuda/core/experimental/include:$CUDA_HOME/include:$CPLUS_INCLUDE_PATH cythonize -3 -i $(dirname "$0")/test_*.pyx diff --git a/cuda_core/tests/example_tests/test_basic_examples.py b/cuda_core/tests/example_tests/test_basic_examples.py index f085e3c61..e3637f974 100644 --- a/cuda_core/tests/example_tests/test_basic_examples.py +++ b/cuda_core/tests/example_tests/test_basic_examples.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 # If we have subcategories of examples in the future, this file can be split along those lines diff --git a/cuda_core/tests/example_tests/utils.py b/cuda_core/tests/example_tests/utils.py index 229851a2f..a4da3d73d 100644 --- a/cuda_core/tests/example_tests/utils.py +++ b/cuda_core/tests/example_tests/utils.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 import gc import os diff --git a/cuda_core/tests/test_context.py b/cuda_core/tests/test_context.py index c907b19cf..4de4e6b40 100644 --- a/cuda_core/tests/test_context.py +++ b/cuda_core/tests/test_context.py @@ -1,10 +1,5 @@ # Copyright 2025 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_core/tests/test_device.py b/cuda_core/tests/test_device.py index 3fed6c32a..309d661f5 100644 --- a/cuda_core/tests/test_device.py +++ b/cuda_core/tests/test_device.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 try: from cuda.bindings import driver, runtime diff --git a/cuda_core/tests/test_event.py b/cuda_core/tests/test_event.py index f568ecdba..d3f830651 100644 --- a/cuda_core/tests/test_event.py +++ b/cuda_core/tests/test_event.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 import os import pathlib diff --git a/cuda_core/tests/test_launcher.py b/cuda_core/tests/test_launcher.py index 43fc9e5fa..0ad6f94e0 100644 --- a/cuda_core/tests/test_launcher.py +++ b/cuda_core/tests/test_launcher.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_core/tests/test_memory.py b/cuda_core/tests/test_memory.py index 1ff728c64..5bcc607da 100644 --- a/cuda_core/tests/test_memory.py +++ b/cuda_core/tests/test_memory.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 try: from cuda.bindings import driver diff --git a/cuda_core/tests/test_module.py b/cuda_core/tests/test_module.py index 608ee03bb..1478b98fc 100644 --- a/cuda_core/tests/test_module.py +++ b/cuda_core/tests/test_module.py @@ -1,11 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. - +# SPDX-License-Identifier: Apache-2.0 import warnings diff --git a/cuda_core/tests/test_stream.py b/cuda_core/tests/test_stream.py index 11cf02fa4..a73655f1a 100644 --- a/cuda_core/tests/test_stream.py +++ b/cuda_core/tests/test_stream.py @@ -1,10 +1,5 @@ # Copyright 2024 NVIDIA Corporation. All rights reserved. -# -# Please refer to the NVIDIA end user license agreement (EULA) associated -# with this source code for terms and conditions that govern your use of -# this software. Any use, reproduction, disclosure, or distribution of -# this software and related documentation outside the terms of the EULA -# is strictly prohibited. +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_core/tests/test_system.py b/cuda_core/tests/test_system.py index e8d3d8355..1640856c2 100644 --- a/cuda_core/tests/test_system.py +++ b/cuda_core/tests/test_system.py @@ -1,3 +1,6 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: Apache-2.0 + try: from cuda.bindings import driver, runtime except ImportError: diff --git a/cuda_python/docs/Makefile b/cuda_python/docs/Makefile index a84f57039..269a54137 100644 --- a/cuda_python/docs/Makefile +++ b/cuda_python/docs/Makefile @@ -1,3 +1,6 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # Minimal makefile for Sphinx documentation # diff --git a/cuda_python/docs/build_all_docs.sh b/cuda_python/docs/build_all_docs.sh index 733ae1bc8..b7bc4b2f7 100755 --- a/cuda_python/docs/build_all_docs.sh +++ b/cuda_python/docs/build_all_docs.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + set -ex # build cuda-python docs diff --git a/cuda_python/docs/build_docs.sh b/cuda_python/docs/build_docs.sh index b5244391f..65501bbfa 100755 --- a/cuda_python/docs/build_docs.sh +++ b/cuda_python/docs/build_docs.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + set -ex if [[ "$#" == "0" ]]; then diff --git a/cuda_python/docs/environment-docs.yml b/cuda_python/docs/environment-docs.yml index e285c3bd5..01abb5ea5 100644 --- a/cuda_python/docs/environment-docs.yml +++ b/cuda_python/docs/environment-docs.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + name: cuda-python-docs channels: - conda-forge diff --git a/cuda_python/docs/source/_static/javascripts/version_dropdown.js b/cuda_python/docs/source/_static/javascripts/version_dropdown.js index 29860a8f8..8d2d73e36 100644 --- a/cuda_python/docs/source/_static/javascripts/version_dropdown.js +++ b/cuda_python/docs/source/_static/javascripts/version_dropdown.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + function change_current_version(event) { event.preventDefault(); diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index fe6e934dc..78791993a 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -1,3 +1,6 @@ +# Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full diff --git a/toolshed/check_spdx.py b/toolshed/check_spdx.py new file mode 100644 index 000000000..1b519cecc --- /dev/null +++ b/toolshed/check_spdx.py @@ -0,0 +1,47 @@ +# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. +# SPDX-License-Identifier: Apache-2.0 + +import os +import sys + +import pathspec + +# Intentionally puzzling together EXPECTED_SPDX_STR so that we don't overlook +# if the identifier is missing in this file. +EXPECTED_SPDX_STR = "-".join(("SPDX", "License", "Identifier: ")) +EXPECTED_SPDX_BYTES = EXPECTED_SPDX_STR.encode() + +SPDX_IGNORE_FILENAME = ".spdx-ignore" + + +def load_spdx_ignore(): + if os.path.exists(SPDX_IGNORE_FILENAME): + with open(SPDX_IGNORE_FILENAME, "r", encoding="utf-8") as f: + lines = f.readlines() + else: + lines = [] + lines.append(SPDX_IGNORE_FILENAME + "\n") + return pathspec.PathSpec.from_lines("gitwildmatch", lines) + + +def has_spdx_or_is_empty(filepath): + with open(filepath, "rb") as f: + blob = f.read() + return len(blob.strip()) == 0 or EXPECTED_SPDX_BYTES in blob + + +def main(args): + assert args, "filepaths expected to be passed from pre-commit" + + ignore_spec = load_spdx_ignore() + + returncode = 0 + for filepath in args: + if not ignore_spec.match_file(filepath) and not has_spdx_or_is_empty(filepath): + print(f"MISSING {EXPECTED_SPDX_STR}{filepath!r}") + returncode = 1 + return returncode + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:]))