Changes

Jump to: navigation, search

GPU621/GPU Targeters

391 bytes added, 14:19, 4 December 2020
Instructions for AMD
== Instructions for AMD==
How to set up compiler and target offloading for Linux on AMD GPU: (Elena)
Note: user should be member of 'video' group
[AOMP https://github.com/ROCm-Developer-Tools/aomp] is an open source Clang/LLVM based compiler with added support for the OpenMP® API on Radeon™ GPUs.
Hello world compilation example:
 
<pre>
// File helloWorld.c
#include <omp.h>
#include <stdio.h>
int main()
{
#pragma omp parallel
{
printf("Hello world!");
}
}
</pre>
 
Make sure to export your new AOMP to PATH
<pre>
export AOMP="/usr/lib/aomp"
export PATH=$AOMP/bin:$PATH
 
clang -fopenmp helloWorld.c -o helloWorld
 
./helloWorld
</pre>
== Results and Graphs (Nathan/Elena) ==
51
edits

Navigation menu