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]: Sample Code in CUB README and docs does not compile #1651

Closed
1 task done
pauleonix opened this issue Apr 19, 2024 · 1 comment · Fixed by #1652
Closed
1 task done

[BUG]: Sample Code in CUB README and docs does not compile #1651

pauleonix opened this issue Apr 19, 2024 · 1 comment · Fixed by #1652
Labels
bug Something isn't working right.

Comments

@pauleonix
Copy link
Contributor

pauleonix commented Apr 19, 2024

Is this a duplicate?

Type of Bug

Compile-time Error

Component

CUB

Describe the bug

The code was taken from cub/examples/block/example_block_radix_sort.cu but slightly modified. The modified version is missing cub:: in two locations for it to compile.

Bug found by Zhixiong Xiao on StackOverflow.com

How to Reproduce

  1. Take code from CUB's README.md
  2. Try to compile it.

Expected behavior

It should compile without errors.

Reproduction link

https://cuda.godbolt.org/z/o7ba9f388

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@pauleonix pauleonix added the bug Something isn't working right. label Apr 19, 2024
@github-project-automation github-project-automation bot moved this to Todo in CCCL Apr 19, 2024
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Apr 19, 2024
@pauleonix pauleonix changed the title [BUG]: Sample Code in CUB README.md does not compile [BUG]: Sample Code in CUB README.md and index.rst does not compile Apr 19, 2024
@pauleonix
Copy link
Contributor Author

pauleonix commented Apr 22, 2024

Adding an instantiation of the kernel shows even more problems:
https://cuda.godbolt.org/z/fh94PnzqM

int * has to be replaced with int in

typedef cub::BlockLoad<
      int*, BLOCK_THREADS, ITEMS_PER_THREAD, BLOCK_LOAD_TRANSPOSE> BlockLoadT;

and the BlockStore instantiation as well.

This one is only wrong in cub/docs/index.rst, not in cub/README.md.

@pauleonix pauleonix changed the title [BUG]: Sample Code in CUB README.md and index.rst does not compile [BUG]: Sample Code in CUB README and docs does not compile Apr 22, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL May 7, 2024
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.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant