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

Regressions observed on HIP/CUDA path after integrating CUB-HIP as a sub-module #6

@sriharikarnam

Description

@sriharikarnam

Facing compilation errors from CUB while exercising Thrust API's on HIP/CUDA path. The branch currently under use is hip_port_1.7.3

Below is the list of issues and fix which works for Thrust API's, these need to be checked-in to the relevant cub-hip branch.

Issue 1: ../thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce.cuh(479): error: expected a ">>>"
../thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce.cuh(479): error: expected a "("
There exists a syntax error in the above mentioned file.

Solution: In file thrust/system/cuda/detail/cub-hip/cub/device/dispatch/dispatch_reduce.cuh ,line no:479
- hipLaunchKernelGGL(single_tile_kernel, 1, 256 0, stream,
+ hipLaunchKernelGGL(single_tile_kernel, 1, 256, 0, stream,
This resolves the issue.

Issue 2 : error: invalid conversion from ‘void ()(const int, int*, int, int, int, thrust::system::cuda::detail::cub_::GridEvenShare)’ to ‘const void*’ [-========= fpermissive]
return hipOccupancyMaxActiveBlocksPerMultiprocessor (

Solution: In file thrust/system/cuda/detail/cub/util_device.cuh, Line no:276
- kernel_ptr,
+ (const void *)kernel_ptr,

This resolves the issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions