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

Build fix for CUDA 12.2 #1870

Merged
merged 2 commits into from
Oct 6, 2023
Merged

Conversation

benfred
Copy link
Member

@benfred benfred commented Oct 3, 2023

Building on cuda 12.2 shows errors like

/code/raft/cpp/include/raft/spatial/knn/detail/ball_cover/registers-inl.cuh(177): error #20054-D: dynamic initialization is not supported for a function-scope static __shared__ variable within a __device__/__global__ function
              KeyValuePair<value_t, value_idx> shared_memV[kNumWarps * warp_q];

Fix by using default constructors for structures in shared memory, even trivial constructors will cause this issue

Building on cuda 12.2 shows errors like

```
/code/raft/cpp/include/raft/spatial/knn/detail/ball_cover/registers-inl.cuh(177): error #20054-D: dynamic initialization is not supported for a function-scope static __shared__ variable within a __device__/__global__ function
              KeyValuePair<value_t, value_idx> shared_memV[kNumWarps * warp_q];
```

Fix by using default constructors for structures in shared memory, even trivial constructors
will cause this issue
@benfred benfred requested review from a team as code owners October 3, 2023 23:04
@benfred benfred added bug Something isn't working non-breaking Non-breaking change labels Oct 3, 2023
@cjnolet
Copy link
Member

cjnolet commented Oct 5, 2023

/merge

@rapids-bot rapids-bot bot merged commit 3241add into rapidsai:branch-23.12 Oct 6, 2023
62 checks passed
divyegala pushed a commit to divyegala/raft that referenced this pull request Oct 6, 2023
Building on cuda 12.2 shows errors like

```
/code/raft/cpp/include/raft/spatial/knn/detail/ball_cover/registers-inl.cuh(177): error #20054-D: dynamic initialization is not supported for a function-scope static __shared__ variable within a __device__/__global__ function
              KeyValuePair<value_t, value_idx> shared_memV[kNumWarps * warp_q];
```

Fix by using default constructors for structures in shared memory, even trivial constructors will cause this issue

Authors:
  - Ben Frederickson (https://github.com/benfred)
  - Corey J. Nolet (https://github.com/cjnolet)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#1870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CMake cpp non-breaking Non-breaking change
Projects
Development

Successfully merging this pull request may close these issues.

2 participants