Skip to content
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

correctly build offload for default OMP_FLAGS_OFFLOAD_* settings #181

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

milthorpe
Copy link

For OpenMP target offload, there are a few default OMP_FLAGS_OFFLOAD_<COMPILER?>_<VENDOR? settings, which may work for some systems e.g. OLCF Frontier. However, setting this flag tuple doesn't currently set OMP_TARGET_GPU, so the application doesn't actually compile for offload.
This fix defines OMP_TARGET_GPU whenever OMP_FLAGS_OFFLOAD_<COMPILER?>_<VENDOR? is defined. With this fix, BabelStream correctly builds for OLCF Frontier with:

module load amd/5.4.0
cmake -Bbuild -H. -DCMAKE_CXX_COMPILER=amdclang++ -DMODEL=omp -DOFFLOAD=AMD:gfx90a

@tomdeakin tomdeakin changed the base branch from main to develop December 14, 2023 13:04
It seems like Ubuntu adds -fcf-protection=full as a default flag for GCC,
which is not supported with AMD OpenMP offload -foffload=amdgcn-amdhsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants