Skip to content

Commit 23ab9a0

Browse files
authored
[no-ci] cuda_core: fix SPDX identifiers and enforce Apache-2.0 headers (#1897)
* Systematically correct SPDX-License-Identifier: Apache-2.0 * toolshed: enforce cuda_core SPDX license policy Refactor the SPDX checker so package-specific license rules can be enforced cleanly while preserving the existing autofix flow. Keep focused regression coverage alongside the toolshed script instead of in routine package test collection. Made-with: Cursor * Remove toolshed/test_check_spdx.py (too much trouble adding it to the CI, but it will bit-rot if untested). * toolshed: normalize SPDX paths with PureWindowsPath Use a standard-library path normalizer so repo-prefix checks treat Windows-style paths consistently on any host. Document why os.path.normpath is not suitable for this forward-slash prefix comparison. Made-with: Cursor
1 parent 0480f77 commit 23ab9a0

34 files changed

+140
-73
lines changed

cuda_core/cuda/core/_include/layout.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES.
22
// All rights reserved.
33
//
4-
// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4+
// SPDX-License-Identifier: Apache-2.0
55

66
#ifndef CUDA_CORE_LAYOUT_HPP
77
#define CUDA_CORE_LAYOUT_HPP

cuda_core/cuda/core/_include/utility.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
//
3-
// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3+
// SPDX-License-Identifier: Apache-2.0
44

55
#pragma once
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
3-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3+
# SPDX-License-Identifier: Apache-2.0

cuda_core/cuda/core/_utils/clear_error_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
3-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3+
# SPDX-License-Identifier: Apache-2.0
44

55

66
def assert_type(obj, expected_type):

cuda_core/cuda/core/_utils/driver_cu_result_explanations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
# SPDX-License-Identifier: Apache-2.0
33

44
from cuda.bindings import driver
55
from cuda.core._utils.enum_explanations_helpers import get_best_available_explanations

cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
# SPDX-License-Identifier: Apache-2.0
33

44
# CUDA Toolkit v13.1.1
55
_FALLBACK_EXPLANATIONS = {

cuda_core/cuda/core/_utils/enum_explanations_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
# SPDX-License-Identifier: Apache-2.0
33

44
"""Internal support for error-enum explanations.
55

cuda_core/cuda/core/_utils/runtime_cuda_error_explanations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
# SPDX-License-Identifier: Apache-2.0
33

44
from cuda.bindings import runtime
55
from cuda.core._utils.enum_explanations_helpers import get_best_available_explanations

cuda_core/cuda/core/_utils/runtime_cuda_error_explanations_frozen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
# SPDX-License-Identifier: Apache-2.0
33

44
# CUDA Toolkit v13.1.1
55
_FALLBACK_EXPLANATIONS = {

cuda_core/pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
3-
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3+
# SPDX-License-Identifier: Apache-2.0
44

55
[pytest]
66
addopts = --showlocals

0 commit comments

Comments
 (0)