Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: In cuda.cooperative linking the same algorithm twice leads to multiple definitions #3909

Open
1 task done
brycelelbach opened this issue Feb 22, 2025 · 0 comments
Open
1 task done
Labels
bug Something isn't working right. cuda.cooperative For all items related to the cuda.cooperative Python module

Comments

@brycelelbach
Copy link
Collaborator

Is this a duplicate?

Type of Bug

Compile-time Error

Component

cuda.cooperative (Python)

Describe the bug

If you link the same instantiation of an algorithm twice in a kernel, you'll get multiple definition errors at JIT compilation time.

This is going to be a problem when people are using multiple libraries/components built with cuda.cooperative, especially when linking is implicit in the future.

We need to do some sort of de-duplication.

How to Reproduce

import cuda.cooperative.experimental as cudax
import numba
from pynvjitlink import patch
patch.patch_numba_linker(lto=True)

load0 = cudax.block.load(numba.int32, 32, 4, algorithm='striped')
load1 = cudax.block.load(numba.int32, 32, 4, algorithm='striped')

@numba.cuda.jit(link=load0.files+load1.files)
def kernel():
  pass

kernel[1, 32]()

Expected behavior

N/A

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@brycelelbach brycelelbach added the bug Something isn't working right. label Feb 22, 2025
@github-project-automation github-project-automation bot moved this to Todo in CCCL Feb 22, 2025
@brycelelbach brycelelbach changed the title [BUG]: [cuda.cooperative] Linking the same algorithm twice leads to multiple definitions [BUG]: In cuda.cooperative linking the same algorithm twice leads to multiple definitions Feb 22, 2025
@brycelelbach brycelelbach added the cuda.cooperative For all items related to the cuda.cooperative Python module label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right. cuda.cooperative For all items related to the cuda.cooperative Python module
Projects
Status: Todo
Development

No branches or pull requests

1 participant