You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <thrust/execution_policy.h>
int main() { return 0; }
results in a compiler/warning error:
$ g++ -std=c++17 test-cuda.cpp -I/opt/cuda/targets/x86_64-linux/include -WerrorIn file included from /opt/cuda/targets/x86_64-linux/include/cuda_runtime_api.h:147, from /opt/cuda/targets/x86_64-linux/include/cub/detail/detect_cuda_runtime.cuh:38, from /opt/cuda/targets/x86_64-linux/include/cub/util_arch.cuh:41, from /opt/cuda/targets/x86_64-linux/include/cub/util_debug.cuh:40, from /opt/cuda/targets/x86_64-linux/include/thrust/system/cuda/config.h:43, from /opt/cuda/targets/x86_64-linux/include/thrust/system/cuda/detail/execution_policy.h:35, from /opt/cuda/targets/x86_64-linux/include/thrust/iterator/detail/device_system_tag.h:23, from /opt/cuda/targets/x86_64-linux/include/thrust/iterator/iterator_traits.h:62, from /opt/cuda/targets/x86_64-linux/include/thrust/detail/type_traits/pointer_traits.h:23, from /opt/cuda/targets/x86_64-linux/include/thrust/detail/raw_pointer_cast.h:20, from /opt/cuda/targets/x86_64-linux/include/thrust/detail/execute_with_allocator.h:23, from /opt/cuda/targets/x86_64-linux/include/thrust/execution_policy.h:25, from test-cuda.cpp:1:/opt/cuda/targets/x86_64-linux/include/crt/host_defines.h:86: error: "__forceinline__" redefined [-Werror] 86 | #define __forceinline__ \ | In file included from /opt/cuda/targets/x86_64-linux/include/cuda/std/version:13, from /opt/cuda/targets/x86_64-linux/include/cuda/std/cstddef:20, from /opt/cuda/targets/x86_64-linux/include/cuda/std/type_traits:17, from /opt/cuda/targets/x86_64-linux/include/thrust/detail/type_traits.h:27, from /opt/cuda/targets/x86_64-linux/include/thrust/detail/execute_with_allocator_fwd.h:21, from /opt/cuda/targets/x86_64-linux/include/thrust/detail/execute_with_allocator.h:21:/opt/cuda/targets/x86_64-linux/include/cuda/std/detail/__config:38: note: this is the location of the previous definition 38 | #define __forceinline__ | cc1plus: all warnings being treated as errors
This is similar to a past issue NVIDIA/thrust#382 but seems to be back.
Is there a way we can compile this with GCC without the warning, since our project uses -Werror?
Cuda: 12.1.0
GCC: 12.2.1
OS: arch linux
The text was updated successfully, but these errors were encountered:
Compiling this 3-line program
test-cuda.cpp
results in a compiler/warning error:
This is similar to a past issue NVIDIA/thrust#382 but seems to be back.
Is there a way we can compile this with GCC without the warning, since our project uses
-Werror
?Cuda: 12.1.0
GCC: 12.2.1
OS: arch linux
The text was updated successfully, but these errors were encountered: