hcc icon indicating copy to clipboard operation
hcc copied to clipboard

Compile problem

Open bshaozi opened this issue 9 years ago • 2 comments

I use 'tile_static std::atomic_int' define a int variate in my code. But there is compile problem as follows:

/opt/rocm/hcc-hsail/compiler/bin/clamp-device: line 167: 13996 Killed $OPT -load $LIB/LLVMPromote.so -load $LIB/LLVMEraseNonkernel.so -load $LIB/LLVMTileUniform.so -promote-globals -promote-privates -erase-nonkernels -tile-uniform -malloc-select -dce -globaldce -S -o $2.promote.ll.orig < $1

And follows is my code snippet: .......... ............ tile_static std::atomic_int outlier_block_count[1]; ........ ....... .... atomic_fetch_add(&outlier_block_count[0], 1); // I think this is the problem point ......

If I comment out 'atomic_fetch_add(&outlier_block_count[0], outlier_local_count); ' line. There is no error in compiling. Is there some special things need to note when use tile_staic std::atmoic_int variate??

bshaozi avatar Sep 19 '16 02:09 bshaozi

can you provide a complete minimal example please?

PhilipDeegan avatar Aug 23 '18 14:08 PhilipDeegan

@bshaozi can you try this with latest ROCM 1.9, and if it is still an issue, provide a small example?

david-salinas avatar Oct 12 '18 20:10 david-salinas