Repository navigation
chore: fix Apache-2.0 license notice and attribution gaps - #812
Merged
nihalpasham merged 3 commits intoAug 12, 2026
Merged
Conversation
An open-source license review of this repo turned up four compliance gaps. All four are fixed here. Licensing metadata only; no logic, API, or behavior changes. 1. LICENSE: the NVIDIA copyright line read "Copyright 2024-2026 NVIDIA CORPORATION", missing the "(c)", the "& AFFILIATES.", and the "All rights reserved." elements. It now matches the required string. The review cited this against LICENSE-APACHE; NVIDIA#331 folded that file into LICENSE on 2026-07-03, after the reviewed snapshot was taken. 2. CONTRIBUTING.md: the "License Headers" section showed a bare SPDX-License-Identifier line in "//" style with no copyright notice. It now shows the "/* */" SPDX block that 599 of the 709 Rust sources already use, states the exact required copyright wording, and lists the per-language comment syntax. 3. Source headers, two defects: - 26 files declared "NVIDIA CORPORATION." without "& AFFILIATES"; these are normalized to the canonical SPDX-FileCopyrightText form. Four further files wrapped the notice across two lines; they are joined so the required sentence appears verbatim. - 47 NVIDIA-authored files carried no SPDX header at all: 8 trybuild fixtures plus 39 non-Rust files (CUDA wrappers, shell scripts, GEMM benches, and the book's JS/CSS/HTML/conf.py). Adding headers to the trybuild fixtures shifts the line numbers their .stderr files assert on, so those expectations are regenerated via TRYBUILD=overwrite; the diffs are line-number shifts only and both suites pass clean afterwards. 4. THIRD_PARTY_NOTICES: added at the repository root. Rustlantis is embedded as inline source under crates/fuzzer/rustlantis/ (46 tracked files, Apache-2.0 OR MIT, (c) ETH Zurich and contributors), so it needs attribution. The file is scoped to that embedded code; Cargo dependencies are not redistributed here and stay recorded in dependency-licenses.csv. Rustlantis' own sources are left untouched so their upstream notices remain intact. Verified: 0 files with a non-conforming copyright string, 0 source files missing SPDX, 1780 files carrying the required notice. cargo fmt clean; scripts/check-dependency-licenses.sh passes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Rob Parolin <[email protected]>
Follow-up to the review of the previous commit, which found three items
still outstanding. All three are addressed here.
1. Sub-component LICENSE files. All 81 non-root LICENSE files still
carried the defective "Copyright 2024-2026 NVIDIA CORPORATION" string;
only the root file had been corrected. They duplicated the root license
with the same copyright holder and were referenced from nowhere, so
they are removed in favour of the root LICENSE. No packaging depends on
them: every crate declares `license = "Apache-2.0"` in its Cargo.toml
and none use `license-file`.
2. Root LICENSE structure. The NVIDIA copyright line sat at the bottom of
the file, in the position the Apache appendix normally occupies. The
copyright now opens the file, and the "APPENDIX: How to apply the
Apache License to your work" section it had displaced is restored. The
appendix text was verified identical to the canonical Apache 2.0 text.
3. Source headers, 31 files:
- 19 carried an SPDX-License-Identifier but no copyright line at all
(example src/main.rs and kernels.rs, the verify-code-shape.sh
scripts, and crates/cuda-oxide-codegen/Cargo.toml). Each now carries
an SPDX-FileCopyrightText line using that file's own comment prefix.
- 12 carried no header whatsoever: Justfile, cuda-oxide-book/Makefile,
crates/cuda-bindings/wrapper.h, the FFI tools/*.c and *.h, both
bench/cublaslt_bench.c, and libmathdx-sys/wrapper.h.
Deliberately not changed:
- crates/cuda-intrinsics-gen/src/probe.rs reproduces ptxas' own banner
("Copyright (c) 2005-2026 NVIDIA Corporation") inside a test fixture
string. That is NVIDIA tool output being asserted on, not this file's
own notice.
- `authors = ["NVIDIA Corporation"]` in example Cargo.toml files is
package metadata, not a copyright notice.
Verified with corrected checks: no file carries a non-conforming NVIDIA
copyright notice, and every source file matching .rs/.c/.h/.cu/.py/.sh/
.js/.css/.html plus Justfile and Makefile carries both SPDX fields. The
earlier verification missed these because its pattern required a trailing
period, it tested only for SPDX-License-Identifier, and its file glob
omitted .c/.h/Justfile/Makefile.
Still open: 15 Cargo.toml manifests (and .cargo/config.toml) carry no SPDX
header. Only 10 of 249 manifests in the repo do. These were not in the
review's list and are left alone pending guidance on whether manifests are
in scope.
cargo fmt clean; cargo check passes; the repo's check-*.sh guards pass.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Rob Parolin <[email protected]>
Signed-off-by: nihalpasham <[email protected]>
Collaborator
|
Gist: covers the compliance review's three remaining items: the 81 per-crate LICENSE copies are gone (every crate declares Verified here:
Landing once CI is green. |
nihalpasham
approved these changes
Aug 12, 2026
nihalpasham
added a commit
that referenced
this pull request
Aug 13, 2026
…s in CI (#853) The open-source review of commit 15fa9d9 confirmed everything from #812 fixed and left two items, both addressed here: 1. Source headers: scripts/check-book-api-names.sh and scripts/check-reserved-prefixes.sh landed after #812 merged (#819, #835) without the standard SPDX header. Both now carry it. 2. Third-party notices: the rangemap sub-crate under crates/fuzzer/rustlantis/ carries its own LICENSE-APACHE and LICENSE-MIT copies, which THIRD_PARTY_NOTICES did not mention. The Rustlantis entry now names that path; both texts are byte-identical to the rustlantis top-level ones. The review also suggested a CI guard, since headers have now drifted twice. scripts/check-spdx-headers.sh requires the two-line header on every tracked *.rs *.sh *.py *.cu *.c *.h *.ll file outside the vendored rustlantis subtree, with a checked exemption for the two CUTLASS-derived BSD-3-Clause helpers the review accepted as-is. It runs as a fourth job of the cargo-deny workflow and from 'just check-guards', and CONTRIBUTING's License Headers section points at it. Signed-off-by: nihalpasham <[email protected]>
1 of 3 tasks
nihalpasham
pushed a commit
that referenced
this pull request
Aug 17, 2026
`check-spdx-headers.sh` globs `*.rs *.sh *.py *.cu *.c *.h *.ll`. Eight tracked first-party files fall outside that list and are therefore unchecked: cuda-oxide-book/_static/css/custom.css cuda-oxide-book/_static/css/lightbox.css cuda-oxide-book/_static/css/nvidia-sphinx-theme.css cuda-oxide-book/_static/js/lightbox.js cuda-oxide-book/_static/js/spa-nav.js cuda-oxide-book/_templates/footer.html cuda-oxide-book/_templates/globaltoc.html flake.nix All eight already carry the standard two-line header, so this changes no file and fails nothing today. That is exactly the hazard the guard's own header describes: the OSRB review fixed 32 files in #812, and the next two scripts to land (#819, #835) arrived without headers because nothing was watching that extension. The same is true here one file type over -- a new book stylesheet or template can land bare and CI stays green. CONTRIBUTING already names HTML's comment form in the header policy, so these files are in policy scope; only the guard's glob was short. Verified: the guard passes unchanged over the extended scope (1803 files, up from 1795), and stripping the header from `flake.nix` or from `_static/js/spa-nav.js` now fails the run, where before it passed. Signed-off-by: Vyncint Ng <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
An open-source license review of this repo turned up four compliance gaps. This fixes all four.
Licensing metadata only. No logic, API, or behavior changes.
What's in the diff
1.
LICENSE. The copyright line readCopyright 2024-2026 NVIDIA CORPORATION, missing(c),& AFFILIATES.andAll rights reserved.. Now matches the required string.The review cited this against
LICENSE-APACHE. #331 folded that file intoLICENSEon 2026-07-03, after the reviewed snapshot was taken, so the fix lands inLICENSEinstead.2.
CONTRIBUTING.md. The license-header example showed a bare SPDX identifier with no copyright notice. Replaced with the/* */block that 599 of 709 Rust files already use, plus the exact required wording and the comment syntax for non-Rust files.3. Headers. 26 files said
NVIDIA CORPORATION.without& AFFILIATES. Another 47 had no SPDX header at all: 8 trybuild fixtures and 39 non-Rust files (CUDA wrappers, thescripts/check-*.shguards, GEMM benches, book assets). Four more had the notice wrapped across two lines and are now joined so the required sentence appears verbatim.4.
THIRD_PARTY_NOTICES. New file.crates/fuzzer/rustlantis/is third-party source vendored in tree (46 files, Apache-2.0 OR MIT, ETH Zurich) with no attribution at the root. Scoped to that alone — Cargo dependencies aren't redistributed here and stay recorded independency-licenses.csv. Rustlantis' own files are untouched so their upstream notices survive.🤖 Generated with Claude Code