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

Cannot build master on roc-1.8.x HCC and HIP #10

Closed
aaronenyeshi opened this issue Jun 19, 2018 · 4 comments
Closed

Cannot build master on roc-1.8.x HCC and HIP #10

aaronenyeshi opened this issue Jun 19, 2018 · 4 comments

Comments

@aaronenyeshi
Copy link
Contributor

I am getting this error when building with HCC and HIP on branches roc-1.8.x:

[ 65%] Linking CXX executable test_hc_device_segmented_radix_sort
[ 65%] Linking CXX executable test_hipcub_device_radix_sort
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `RocprimDeviceSegmentedRadixSort_SortKeys_Test<params<__half, int, true, 0u, 16u, 2000u, 10000u> >::TestBody()':
(.text+0x37fed): undefined reference to `operator==(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__inplace_stable_sort<__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> >)':
(.text+0x3931a): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__inplace_stable_sort<__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> >)':
(.text+0x39370): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__inplace_stable_sort<__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> >)':
(.text+0x39393): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__merge_without_buffer<__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, long, long, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> >)':
(.text+0x3955b): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__merge_without_buffer<__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, __gnu_cxx::__normal_iterator<__half*, std::vector<__half, std::allocator<__half> > >, long, long, __gnu_cxx::__ops::_Iter_comp_iter<key_comparator<__half, true, 0u, 16u> >)':
(.text+0x395cb): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o:(.text+0x39682): more undefined references to `operator<(__half const&, __half const&)' follow
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `RocprimDeviceSegmentedRadixSort_SortPairs_Test<params<__half, int, true, 0u, 16u, 2000u, 10000u> >::TestBody()':
(.text+0x87d6e): undefined reference to `operator==(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> >)':
(.text+0x89987): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> >)':
(.text+0x899ff): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> >)':
(.text+0x89a29): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__merge_without_buffer<__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, long, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, long, long, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> >)':
(.text+0x89b0b): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `void std::__merge_without_buffer<__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, long, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> > >(__gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, __gnu_cxx::__normal_iterator<std::pair<__half, int>*, std::vector<std::pair<__half, int>, std::allocator<std::pair<__half, int> > > >, long, long, __gnu_cxx::__ops::_Iter_comp_iter<key_value_comparator<__half, int, true, 0u, 16u> >)':
(.text+0x89b7b): undefined reference to `operator<(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o:(.text+0x89c28): more undefined references to `operator<(__half const&, __half const&)' follow
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `RocprimDeviceSegmentedRadixSort_SortKeysDoubleBuffer_Test<params<__half, int, true, 0u, 16u, 2000u, 10000u> >::TestBody()':
(.text+0xd0d14): undefined reference to `operator==(__half const&, __half const&)'
/tmp/tmp.1u2OOtEjNp/test_hip_device_segmented_radix_sort.cpp.host.o: In function `RocprimDeviceSegmentedRadixSort_SortPairsDoubleBuffer_Test<params<__half, int, true, 0u, 16u, 2000u, 10000u> >::TestBody()':
(.text+0x1032ea): undefined reference to `operator==(__half const&, __half const&)'
clang-7.0: error: linker command failed with exit code 1 (use -v to see invocation)
test/rocprim/CMakeFiles/test_hip_device_segmented_radix_sort.dir/build.make:90: recipe for target 'test/rocprim/test_hip_device_segmented_radix_sort' failed
make[2]: *** [test/rocprim/test_hip_device_segmented_radix_sort] Error 1
CMakeFiles/Makefile2:502: recipe for target 'test/rocprim/CMakeFiles/test_hip_device_segmented_radix_sort.dir/all' failed
make[1]: *** [test/rocprim/CMakeFiles/test_hip_device_segmented_radix_sort.dir/all] Error 2
@ex-rzr
Copy link
Contributor

ex-rzr commented Jun 20, 2018

It seems that HIP team replaced clang's __fp16 with a custom implementation:
ROCm/HIP@1dba835
And now most of __half operators are device only (while the radix sort tests use host operators to check sorting using std::stable_sort).

The simplest way is to remove tests with half. Perhaps it's also possible to sort using conversion to/from float or double.

@ex-rzr
Copy link
Contributor

ex-rzr commented Jun 21, 2018

@aaronenyeshi, could you check this branch https://github.com/ROCmSoftwarePlatform/rocPRIM/tree/fix_half_tests_on_new_hip?

We use HIP and HCC installed from debs, and it seems that it's impossible to use the latest HIP (from sources) on older HCC (from debs).

@jszuppe
Copy link
Contributor

jszuppe commented Jul 2, 2018

@aaronenyeshi Any update?

@aaronenyeshi
Copy link
Contributor Author

I was able to build after removing the half tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants