Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Compiler warnings when including cuda/atomic with CUDA 11.2 #126

Closed
maddyscientist opened this issue Feb 27, 2021 · 1 comment · Fixed by #127
Closed

Compiler warnings when including cuda/atomic with CUDA 11.2 #126

maddyscientist opened this issue Feb 27, 2021 · 1 comment · Fixed by #127
Assignees
Milestone

Comments

@maddyscientist
Copy link
Collaborator

The following warnings are triggered when including cuda/atomic with CUDA 11.2 with g++-9 when building with -Wall -Wextra

/usr/local/cuda-11.2/bin/../targets/x86_64-linux/include/cuda/std/atomic: In function 'void cuda::__3::atomic_thread_fence(cuda::__3::memory_order, cuda::__3::thread_scope)':
/usr/local/cuda-11.2/bin/../targets/x86_64-linux/include/cuda/std/atomic:161:64: warning: unused parameter '_Scope' [-Wunused-parameter]
  161 | inline __host__ __device__ void atomic_thread_fence(memory_order __m, thread_scope _Scope = thread_scope_system) {
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_Jan__4_19:13:17_PST_2021
Cuda compilation tools, release 11.2, V11.2.124
Build cuda_11.2.r11.2/compiler.29467849_0

and

$ g++ --version
g++ (Ubuntu 9.3.0-11ubuntu0~18.04.1) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This warnings wasn't triggered with earlier versions of CUDA (11.0 and 11.1).

@wmaxey wmaxey self-assigned this Feb 27, 2021
@wmaxey wmaxey added the bug label Feb 27, 2021
@wmaxey wmaxey added this to the 2.0.0 milestone Feb 27, 2021
@wmaxey
Copy link
Member

wmaxey commented Feb 27, 2021

Thanks for finding this, I will investigate.

Unfortunately we just cut version 1.4.1 which will be in CUDA Toolkit 11.3 and may still produce this warning. The next available fix will be after that release.

wmaxey added a commit that referenced this issue Mar 4, 2021
Fixed Issue #126 (Compiler warnings when including "cuda/atomic" with CUDA 11.2)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants