Skip to content

chore: unify Apache-2.0 licensing and fix smoke markers - #331

Merged
nihalpasham merged 2 commits into
mainfrom
relicense-cuda-bindings-apache-2-smoketest-markers
Jul 3, 2026
Merged

nihalpasham merged 2 commits into
mainfrom
relicense-cuda-bindings-apache-2-smoketest-markers

Conversation

@nihalpasham

Copy link
Copy Markdown
Collaborator

Summary

Unify cuda-oxide under Apache-2.0 and fix two examples that completed successfully but were reported as smoke-test failures because their output lacked recognized success markers.

The internal approval for this change covers cuda-bindings and the remaining tracked NVIDIA-proprietary asset headers. NVIDIA copyright notices and technical/product references remain intact; only the obsolete proprietary-license terms and contribution restrictions are removed.

Before: successful example -> exit 0 + unrecognized prose -> smoke FAIL
After:  validated success  -> explicit PASS marker          -> smoke PASS

What changed

Licensing and contribution policy

  • Rename LICENSE-APACHE back to the canonical root LICENSE and remove LICENSE-NVIDIA.
  • Make cuda-bindings inherit the workspace's Apache-2.0 license, update its SPDX headers and documentation, and include the license text in its crate archive.
  • Change the two checked-in GEMM tutorial scripts and the book theme CSS from their approved proprietary SPDX blocks to Apache-2.0, preserving their NVIDIA copyright notices.
  • Remove the cargo-deny proprietary-license exception and the NVIDIA-authorship CI guard.
  • Remove stale authorship restrictions from CODEOWNERS comments, the PR template, and source documentation.
  • Update contributor guidance so external authors do not claim NVIDIA copyright, and refresh the tracked license inventory's first-party classifications.
  • Keep separately licensed third-party components and their notices unchanged.

Smoke-test signals

  • Emit PASS: from const_generic only after its PTX checks or all GPU result assertions succeed.
  • Emit explicit success markers after completed gemm_sol_final GPU work and from a PTX-only fallback that verifies a supported tcgen05 target plus both expected kernel entries.
  • Keep the smoke harness strict; this does not broaden its accepted marker patterns or hide non-zero exits/failure output.

Testing

  • cargo fmt --all -- --check in the root workspace, rustc-codegen-cuda, and both changed examples

  • git -c core.whitespace=cr-at-eol diff --check (the license inventory intentionally uses CRLF)

  • cargo metadata --no-deps --format-version 1 reports cuda-bindings: license=Apache-2.0, license_file=null

  • cargo deny check (advisories, bans, licenses, and sources all pass; existing duplicate-version warnings remain)

  • cargo check -p cuda-bindings

  • cargo package -p cuda-bindings --allow-dirty --no-verify --list includes LICENSE

  • cargo test -p cargo-oxide --all-targets (59 passed)

  • cargo test --all-targets in gemm_sol_final (8 passed, including target-gating and PTX-contract negatives)

  • Tracked-file audit finds no LICENSE-NVIDIA, NVIDIA Software License, LicenseRef-Nvidia*, NVIDIA-proprietary classification, or obsolete NVIDIA-authorship guard reference

  • ptxas -arch=sm_100a gemm_sol_final.ptx succeeds for the fresh .target sm_100a artifact

  • Focused runtime smoke test on an RTX 5090 (sm_120): 2/2

    const_generic  ... PASS
    gemm_sol_final ... PASS (tcgen05, PTX compiled)
    
  • Focused --compile-only smoke test: 2/2

  • Adversarial GEMM_SOL_MODE=plan smoke run remains a non-execution failure instead of being mislabeled executed

The gemm_sol_final numerical validation path still requires a compatible datacenter tcgen05 GPU (for example sm_100 or sm_103); this sm_120 host correctly exercised and assembled the PTX-only fallback instead.

Checklist

  • All commits signed off
  • SPDX headers updated without removing copyright attribution
  • No open issue is claimed as fixed

@nihalpasham
nihalpasham merged commit dc10d4a into main Jul 3, 2026
27 checks passed
@nihalpasham
nihalpasham deleted the relicense-cuda-bindings-apache-2-smoketest-markers branch July 30, 2026 01:39
nihalpasham added a commit that referenced this pull request Aug 12, 2026
* chore: fix Apache-2.0 license notice and attribution gaps

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; #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]>

* chore: complete Apache-2.0 license notice and attribution fixes

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]>

* chore: restore trailing newlines lost by the header insertion

Signed-off-by: nihalpasham <[email protected]>

---------

Signed-off-by: Rob Parolin <[email protected]>
Signed-off-by: nihalpasham <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: nihalpasham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant