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

Compilation Error while compiling Thrust Library with CUB-HIP as sub module. #5

Open
sriharikarnam opened this issue Dec 18, 2017 · 3 comments

Comments

@sriharikarnam
Copy link
Contributor

The below compilation errors are thrown from CUB-HIP while exercising Thrust API in HIP/ROCm path. CUB-HIP is a sub-module in Thrust.
While traversing through the folder the compiler searches for a file present one level before the actual one.
../thrust/system/cuda/detail/cub/device/dispatch/dispatch_select_if.cuh:46:10: fatal error: '../../hip_helpers/forwarder.hpp' file not found
#include "../../hip_helpers/forwarder.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce_by_key.cuh:46:10: fatal error: '../../hip_helpers/forwarder.hpp' file not found
#include "../../hip_helpers/forwarder.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../thrust/system/cuda/detail/cub/device/dispatch/dispatch_rle.cuh:47:10: fatal error: '../../hip_helpers/forwarder.hpp' file not found
#include "../../hip_helpers/forwarder.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Steps to reproduce:
$ git clone https://github.com/ROCmSoftwarePlatform/Thrust.git
$ cd Thrust
$ export HIP_PLATFORM=hcc (For HCC Platform )
$ cd examples
$ cp histogram.cu histogram.cpp
$ /opt/rocm/bin/hipcc histogram.cpp -I../ -o histogram.cpp.out

Solution: The below solution can be incorporated.
In file ../thrust/system/cuda/detail/cub/device/dispatch/dispatch_select_if.cuh
Line no:46
- #include "../../hip_helpers/forwarder.hpp"
+ #include "../../../hip_helpers/forwarder.hpp"

The above solution can be implemented in the other two files mentioned above.

@scchan
Copy link

scchan commented Dec 19, 2017

Could you create a pull request for this please? Thanks!

@sriharikarnam
Copy link
Contributor Author

@scchan
pull request has been submitted for regression issues on HIP/CUDA.
#7

@odellus
Copy link

odellus commented Nov 11, 2018

I'm seeing

In file included from /usr/local/include/thrust/system/cuda/detail/cub/device/device_histogram.cuh:41:
/usr/local/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_histogram.cuh:47:10: fatal error: '../../../hip_helpers/forwarder.hpp' file not found
#include "../../../hip_helpers/forwarder.hpp"

when building the ROCm fork of Pytorch.

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

No branches or pull requests

3 participants