hcc icon indicating copy to clipboard operation
hcc copied to clipboard

Error: 'amdgpu_flat_work_group_size' attribute requires an integer constant

Open sriharikarnam opened this issue 7 years ago • 1 comments

Background: Porting Thrust to ROCm Platform Issue: Compilaton error 'amdgpu_flat_work_group_size' attribute requires an integer constant

../Thrust/thrust/system/cuda/detail/bulk/detail/cuda_launcher/triple_chevron_launcher.hpp:63:1: error: 'amdgpu_flat_work_group_size' attribute requires an integer constant bulk_launch_bounds(block_size, 0)

[launch_bounds_error_Thrust.txt] (https://github.com/RadeonOpenCompute/hcc/files/1344054/launch_bounds_error_Thrust.txt)

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here block_size is a non-type template argument of type int and will be a constant at compile time. If an integer value is passed instead of block_size to bulk_launch_bounds() then issue is not reproducing.

Environment info:

  • Operating System: Ubunut 16.04
  • Compiled the code with hipcc
  • ROCm Version: 1.6.148

Steps to reproduce the issue:

  • $git clone https://github.com/ROCmSoftwarePlatform/Thrust
  • $export HIP_PLATFORM=hcc
  • $cd Thrust/examples/
  • $cp sum.cu sum.cpp
  • $/opt/rocm/bin/hipcc sum.cpp -I../ -o sum.cpp.o

Please support for fixing the issue.

sriharikarnam avatar Sep 29 '17 11:09 sriharikarnam

Does this issue still happen on ROCm 1.7 ?

aaronenyeshi avatar Feb 01 '18 20:02 aaronenyeshi