NVIDIA / cccl

CUDA Core Compute Libraries
https://nvidia.github.io/cccl/
Other
1.32k stars 168 forks source link

[BUG]: Consolidate conflicting licenses #182

Open miscco opened 1 year ago

miscco commented 1 year ago

Is this a duplicate?

Type of Bug

Something else

Component

libcu++

Describe the bug

While we have different licenses between thrust, cub and libcu++ we also have conflicting licenses within libcu++.

We should be consistent in our usage of licenses that make clear, what is code that we modified and what is code that comes directly from llvm libc++.

How to Reproduce

Nothing, just the headers

Expected behavior

We should either use our libcu++ header:

//===----------------------------------------------------------------------===//
//
// Part of libcu++, the C++ Standard Library for your entire system,
// under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
//
//===----------------------------------------------------------------------===//

or the llvm header:

// -*- C++ -*-
//===-------------------------- memory ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

My personal proposal would be that everything that is inside libcxx remains with the llvm license, as well as everything that is not exposed through libcu++.

Any other header / test file should come with our own license header.

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

Artem-B commented 3 months ago

I've been recently going through the LICENSE file and our license checker spotted few more discrepancies:

jrhemstad commented 3 months ago

Thanks @Artem-B. I've been trying to pin down a lawyer to help us figure out how to consolidate our license mess for a while.

Is the license checker tool you mentioned public? That sounds like something that would be interesting to me.

Artem-B commented 3 months ago

Unfortunately it's an internal tool.

Speaking of lawyers, another thing it pin-pointed is that the LICENSE also includes a fairly restrictive NVIDIA's own license that contains things like these:

https://github.com/NVIDIA/cccl/blob/a7837d3806fc834844b35d3372e7f47b56c0b4a4/LICENSE#L337C1-L343C1

3. LIMITATIONS. Your license to use the SOFTWARE is restricted as follows:
...
c.  You may not modify or create derivative works of any portion of the SOFTWARE.
...
e.  You may not use the SOFTWARE in any manner that would cause it to become subject to an open source software license. As examples, licenses that require as a condition of use, modification, and/or distribution that the SOFTWARE be (i) disclosed or distributed in source code form; (ii) licensed for the purpose of making derivative works; or (iii) redistributable at no charge.

I'm not quite sure how one can use CCCL without creating derivative works. And not allowing an open-source library use in a project that may require it to be open-sourced is... just plain weird. It also makes me wonder -- does it mean that CCCL can't be used along with GPL-licensed code?

Does NVIDIA's license apply to all the files in NCCL or only to some of them?

Enforcing these restrictions on all CUDA users (via libcudacxx, which ships with CUDA's own headers that do use it) may be a bit of a problem.

jrhemstad commented 3 months ago

Does NVIDIA's license apply to all the files in NCCL or only to some of them?

That particular license only applies to two headers in libcu++ that were originally released as part of the CTK independent of libcu++/CCCL and then were later absorbed into libcu++ with license different from the rest of the headers in libcu++.

https://github.com/NVIDIA/cccl/blob/main/libcudacxx/include/cuda/pipeline https://github.com/NVIDIA/cccl/blob/main/libcudacxx/include/cuda/annotated_ptr

Artem-B commented 3 months ago

Any chance they could be relicensed under Apache or other less restrictive license?