Simple test which shows how to use hipify to port CUDA code to HIP.
See related blog that explains the example. Now it is even simpler and requires no manual modification to the hipified source code - just hipify and compile:
Add hip/bin path to the PATH :
$ makeMake runs these steps. This can be performed on either CUDA or AMD platform:
hipify-perl square.cu > square.cpp# convert cuda code to hip code
hipcc square.cpp# compile into executable