I used hipify-perl to port cuda code into hip code.
hipcc compile it
hipcc-cmd: /opt/rocm/llvm/bin/clang++ -std=c++11 -isystem /root/llvm_amd/dist/lib/clang/11.0.0/include -isystem /opt/rocm/hsa/include -isystem /opt/rocm-3.1.0/include -D__HIP_ARCH_GFX803__=1 --cuda-gpu-arch=gfx803 -O3 -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false --hip-device-lib-path=/opt/rocm/lib -L/opt/rocm-3.1.0/lib -Wl,--rpath-link=/opt/rocm-3.1.0/lib -lhip_hcc --cuda-gpu-arch=gfx803 -O3 -lgcc_s -lgcc -lpthread -lm -I src -o Mergesort -x hip tests/test_mergesort.cpp
when run the Mergesort, output this:
terminate called after throwing an instance of 'std::runtime_error' what(): No device code available for function: __device_stub__ZN4mgpu7dummy_kILi0EEEvv, for agent: gfx803 Aborted (core dumped)
how to fix it?
@newbee816 Sorry for the lack of response. Please try latest ROCm 6.0.2 (HIP 6.0.32831) to see if your issue still exists? If resolved, please close the ticket. Thanks.
I used hipify-perl to port cuda code into hip code. hipcc compile it
hipcc-cmd: /opt/rocm/llvm/bin/clang++ -std=c++11 -isystem /root/llvm_amd/dist/lib/clang/11.0.0/include -isystem /opt/rocm/hsa/include -isystem /opt/rocm-3.1.0/include -D__HIP_ARCH_GFX803__=1 --cuda-gpu-arch=gfx803 -O3 -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false --hip-device-lib-path=/opt/rocm/lib -L/opt/rocm-3.1.0/lib -Wl,--rpath-link=/opt/rocm-3.1.0/lib -lhip_hcc --cuda-gpu-arch=gfx803 -O3 -lgcc_s -lgcc -lpthread -lm -I src -o Mergesort -x hip tests/test_mergesort.cpp
when run the Mergesort, output this:terminate called after throwing an instance of 'std::runtime_error' what(): No device code available for function: __device_stub__ZN4mgpu7dummy_kILi0EEEvv, for agent: gfx803 Aborted (core dumped)
how to fix it?