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

@sriharikarnam

Description

@sriharikarnam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions