...
Note | ||
---|---|---|
| ||
The content of this section is currently being updated to include material relevant for Phase-2 of Setonix and the use of GPUs. |
HIP: Heterogeneous Interface for Portability is developed by AMD to program on AMD GPUs.
...
The hipify perl script acts directly on the CUDA source code using a series of simple string replacements. Ex., (sed e ’s/cuda/hip/g’)
To convert the a CUDA file (foo.cu
, for example) to HIP format, enter the following after loading hip/4.3.0a ROCm module:
Code Block |
---|
$ module load rocm/version<version> $ hipify-perl foo.cu > new_foo.cpp |
You can then compile the HIP ready . cpp file for the ROCm environment using the HIP/ Clang compiler provided in the ROCm installation:
Code Block |
---|
$ module load rocm/version
$ hipcc new_foo.cpp |
there There are couple of utility script availed several other utility scripts available to support the porting the codes of codes:
Code Block |
---|
$ echo $(hipconfig --path) $ findcode.sh hipcc hipconfig hipconvertinplace.sh hip_embed_pch.sh hipexamine.sh hipify-perl roc-obj-extract finduncodep.sh hipcc_cmake_linker_helper hipconvertinplace-perl.sh hipdemangleatp hipexamine-perl.sh hipify-cmakefile hipvars.pm roc-obj-ls |
...