diff --git a/.github/copy-pr-bot.yaml b/.github/copy-pr-bot.yaml index 2771228b70e..1c459569ad2 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 9ec80a39a6c..a7112246a3a 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 00000000000..60435ebb533 --- /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 9527072c8b7..b340c74ab64 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 e1d72d26dc7..97150116639 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 119727b2d7c..d5857eadd1c 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 a74acd3e297..d7b4769db69 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 68fdd9831aa..33dfecbf8d3 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 7af5f84cc3c..e79542c04a5 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 36361d351f4..49035e0cd86 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 5c9dbc2b641..ecaaa8db59f 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 2bde5f72e23..8086b4f6f1f 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 2179a10bdff..a5aadc37b7e 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 44233c5b462..f5e8ead80fd 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 b45bdde3cf3..058101c94e3 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 81283084f3d..b6b896765d8 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 aef8a71b237..ee6e7021533 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 db5d7ada98c..d1636bbbd4d 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 f4608770089..b4745b5c465 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 6bfefac5c56..3ddab4e558e 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 b2477fef3af..e80c5574db7 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 2963d9e0db2..eb9783bb569 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 17151580963..4310f14e714 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 6a8101e3a28..044eeaece7a 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 0f2685b9984..6337894bfff 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 eb361252265..a4efc67f0f4 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 abe1d994031..65766c671f6 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 808c7186cf0..21207a9691f 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 63386a1779f..648b7fda00d 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 2dfa4deb6e6..b9a957af0c3 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 440006f57a3..bfe2f426a60 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 d8f6b790bb4..a67bdfda155 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 fdcaafd2c18..ed85149b3b5 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 293274d149f..645a0bf9c2e 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 68db6b03247..7f0ffca84a7 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 7697f0decaf..5b5752b3904 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 7500078fb62..a432f21558d 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 1d5cbae0149..a19e081c3ad 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 206089b5800..83083ab6a7b 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 f1dc2b54911..ae4ab76a1a3 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 d323619ca98..dd1513f4891 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 3198ce2bddd..7ed8f65334c 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 c45c34da0bd..6e73074fbcb 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 b8771dd301b..a256ae453c2 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 e3dd52de0b7..07d2af3437a 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 717e58a1ea1..9fcfff47391 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 a6f56b45298..83987c8fbdc 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 c3b8aa6f2f1..4e36cce1efc 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 2a0f2672fb7..57a5f476f85 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 0ad01d58f0f..187ed5746e6 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 f7c3def5d8b..46e121f1003 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 17b3c1ea8ed..e1a6d66d7ae 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 ed81707139b..5805b5ead3f 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 319512fa589..2fb4e05df76 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 981b62228cb..8d8228a92df 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 e3d2986bb76..9dc2380476d 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 09ff61b8c46..8e1f1d7c3f4 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 75f2ef6c2be..f03265caf22 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 ffeece9da84..1ed8bc6c576 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 9534b018135..88e1803f4c2 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 29860a8f84c..8d2d73e364d 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 5ea8b444340..699bb28addf 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 8755470333e..e13dc015c72 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 8b951b2e080..776a510cb74 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 c8a1ca9e6b3..bac967c9216 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 c5e7a144aec..af8706ff638 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 69d157ca8b5..ac026268ad1 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 82ef437c6e3..236151bfa0f 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 a2ade6056f5..49990dbfc10 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 aaa2f5d7a17..b0267a0d472 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 ed506921961..2f39699f165 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 89e36a4c65b..38ea372ed82 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 76f66832c64..e96583e6880 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 8d8443e8813..3ad670311e7 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 f7eb1abb976..be5f217b9ac 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 9985359921b..9105273b658 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 c45bf46abb8..8d17aba0fc8 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 013d75f7287..682e55f397f 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 3f1222e89ba..12fea39af09 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 2262278c9c0..a2cde9df96a 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 29860a8f84c..d9c633cf968 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 23bb0274e51..b27a336768f 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 d85ccec77c5..3ffe61ef73f 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 f085e3c614d..e3637f9748c 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 229851a2f70..a4da3d73d75 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 c907b19cf46..4de4e6b4014 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 3fed6c32a18..309d661f507 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 f568ecdbaa9..d3f83065179 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 43fc9e5fa86..0ad6f94e0cb 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 1ff728c643a..5bcc607da9f 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 608ee03bb16..1478b98fc30 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 11cf02fa4b5..a73655f1a82 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 e8d3d835544..1640856c243 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 a84f5703984..269a5413794 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 733ae1bc87c..b7bc4b2f72b 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 b5244391f14..65501bbfa02 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 e285c3bd543..01abb5ea58c 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 29860a8f84c..8d2d73e364d 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 fe6e934dc35..78791993a0f 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 00000000000..1b519ceccfe --- /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:]))