-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build Clang/LLVM with OpenMP+ GPU support #103
Labels
good first issue
Good for newcomers
Comments
//https://lc.llnl.gov/confluence/display/LC/Clang+OpenMP+4.5+with+GPU+support#space-menu-link-content
#include <stdio.h>
#include <omp.h>
int main()
{
int runningOnGPU = 0;
/* Test if GPU is available using OpenMP4.5 */
#pragma omp target map(from:runningOnGPU)
{
if (omp_is_initial_device() == 0)
runningOnGPU = 1;
}
/* If still running on CPU, GPU must not be available */
if (runningOnGPU)
printf("### Able to use the GPU! ### \n");
else
printf("### Unable to use the GPU, using CPU! ###\n");
return 0;
} results
|
No more warning about libomptarget lib. But the code still does not behave as expected.
|
@ouankou Can you test the instructions on http://freecompilercamp.org/llvm-openmp-build/ using the GPU machine? I updated them a few weeks back and I need someone to review/test them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
part of the process to revise the steps, ask the official steps.
https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs
Later deployed in AWS gpu instance
The text was updated successfully, but these errors were encountered: