# Third-party licenses for the KDB-X GPU module

_This reference covers cuCollections and the CUDA Core Compute Libraries (CCCL) used to build the KDB-X GPU module. It summarizes their licenses and what to include when redistributing the module binary._

The only charge for the product is for the kdb+ GPU feature-flag license. None of the listed components carries a fee or uses a copyleft license.

For separately installed runtime dependencies, see [Required CUDA libraries](gpu-env.md#required-cuda-libraries).

## NVIDIA cuCollections (cuco)

* **Project:** [NVIDIA cuCollections](https://github.com/NVIDIA/cuCollections)
* **License:** [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), © 2019 NVIDIA.
* **Use:** Header-only. The GPU module compiles cuCollections into `gpu.li64.so` for hash-based grouping and joins.
* **Modification:** gpulib modifies cuco. A small patch removes `noexcept` from the `static_set` initialization and clear path so CUDA exceptions can reach the caller. The patch is applied at build time, and the upstream checkout is not changed.
* **Obligations for binary distribution (Apache-2.0 §4):**
    * Include a copy of the Apache-2.0 license text with the product.
    * State that the cuco files are modified. This is required, because the build modifies them.
    * NOTICE attribution (§4(d)) does not apply. cuco has no NOTICE file.

## CUDA Core Compute Libraries (CCCL)

See the [CCCL license file](https://github.com/NVIDIA/cccl/blob/main/LICENSE) for component-specific terms and exceptions.

### libcu++

* **License:** [Apache License 2.0 with LLVM Exceptions](https://llvm.org/LICENSE.txt). The LLVM Exception text is found at the same link.
* **Obligations:** The LLVM Exception covers code that is embedded into object form by compilation. Redistributing the compiled binary does not require the §4(a), §4(b) or §4(d) attribution steps.

### CUB

**License:** [BSD 3-Clause](https://opensource.org/license/bsd-3-clause), © Duane Merrill and NVIDIA.
* **Obligations:** Binary distributions must reproduce the copyright notice and the disclaimer in the documentation or other materials supplied with the distribution. Do not use NVIDIA's name to endorse the product.

### Thrust

* **License:** [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), except `thrust::complex`. That code is derived from FreeBSD and falls under the [BSD 2-Clause license](https://opensource.org/license/bsd-2-clause).
* **Obligations:** Binary distributions must reproduce the copyright notice and the disclaimer for the FreeBSD-derived code in the documentation.

## Compliance checklist

When shipping `gpu.li64.so`:

1. Ship the Apache-2.0 license text for cuco, Thrust and libcu++, or link to it.
2. Reproduce the BSD 3-Clause (CUB) and BSD 2-Clause (`thrust::complex`) copyright notices and disclaimers in the product documentation.
3. Disclose that cuco has been modified.
