ROCm/rocThrust

Compilation error when using non-hipcc compiler

eddy16112 opened this issue · 2 comments

Here is a reproducer:

test_header.h
#include<thrust/complex.h>

test.cc
#include"test_header.h"

void main()
{}

If I compile test.cc with hipcc, then everything works, but if with g++, then I am getting the following errors:

In file included from /opt/rocm-4.3.1/include/thrust/system/cuda/detail/execution_policy.h:33,
                 from /opt/rocm-4.3.1/include/thrust/iterator/detail/device_system_tag.h:23,
                 from /opt/rocm-4.3.1/include/thrust/iterator/iterator_traits.h:111,
                 from /opt/rocm-4.3.1/include/thrust/detail/type_traits/pointer_traits.h:23,
                 from /opt/rocm-4.3.1/include/thrust/type_traits/is_contiguous_iterator.h:27,
                 from /opt/rocm-4.3.1/include/thrust/type_traits/is_trivially_relocatable.h:19,
                 from /opt/rocm-4.3.1/include/thrust/detail/complex/complex.inl:20,
                 from /opt/rocm-4.3.1/include/thrust/complex.h:1032,
                 from complex_test.cc:2:
/opt/rocm-4.3.1/include/thrust/system/cuda/config.h:76:10: fatal error: cub/util_namespace.cuh: No such file or directory
 #include <cub/util_namespace.cuh> // This includes <cub/version.cuh> in newer releases.

@eddy16112 I think this has been addressed in recent ROCm releases. Can you please try with the latest version?

Closing as there is no reply from the user