...
$ hipify-perl hello.cu > hello.hip.cucpp
When using a CUDA backend for compiling, note how the .cu extension has to be kept, to allow for the subsequent compilation with a CUDA backend. On the other hand, when using a ROCm backend for compiling, HIP source files typically have the .cpp extension.
...
HIP code can be compiled by using the hipcc
compiler provided by AMD ROCm:
$ hipcc --offload-arch=<architecture> hello.hip.cu cpp -o helloHIP
The code can be executed in an interactive SLURM session or within a batch job. An explicit request to use one or more GPUs is required. Terminal 1 shows an interactive session on GarrawarlaSetonix:
Column | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
...
- For ROCm/HIP tutorials, see the external AMD ROCm learning centreDeveloper Hub
- For links to the HIP Programming GuideManual and other documentation around HIP, see the HIP homepage
- For documentation around the ROCm platform, see the external ROCm homepage
- AMD shares ROCm/HIP source codes on GitHub:
...