ROCm/hipCUB

thread_operators.hpp misses include of "../util_type.hpp"

Closed this issue · 8 comments

https://github.com/ROCmSoftwarePlatform/hipCUB/blob/master/hipcub/include/hipcub/rocprim/thread/thread_operators.hpp

WIthout said include, KeyValuePair is not defined and PyTorch compilation crashes.

How do you include hipCUB headers? I hope not hipcub/rocprim/thread/thread_operators.hpp?

The valid way is to include the main header only:

#include <hipcub/hipcub.hpp>

(I guess this should be added to README)

The reason is to support both CUB and rocPRIM, otherwise the user would need to deal with paths.

Please add this to README. Also where should one define the HIPCUB_ARCH=1. Is that auto detected by compiler?

This needs to be in the documentation.

Ah, I remember that the notice about the main header was somewhere.
It's here:
https://github.com/ROCmSoftwarePlatform/hipCUB/blob/master/doc/mainpage.dox#L16

I'll add this info to README.

However, a comment from the users:

PyTorch is including certain cub headers directly (device_scan, device_reduce, block_reduce, …) – we expect hipCUB to be compatible to that use case.

We can't do this, because hipCUB is supposed to support two backends.

Fixed in #14