[PATCH] D94961: [OpenMP] Add OpenMP offloading toolchain for AMDGPU

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 2 03:03:48 PST 2021


JonChesterfield added inline comments.


================
Comment at: clang/test/Driver/amdgpu-openmp-toolchain.c:2
+// REQUIRES: amdgpu-registered-target
+// RUN:   %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 %s 2>&1 \
+// RUN:   | FileCheck %s
----------------
pdhaliwal wrote:
> jdoerfert wrote:
> > Would this at all work without the march flag?
> This would not work without -march flag as amdgcn is not forward/backward compatible and there is currently no way to detect system gpu arch.
The command line invocation openmp needs `-fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906` could be friendlier.

Auto-detecting march is convenient in general but probably bad for clang tests as we want them to run on systems that don't have an amdgpu installed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94961/new/

https://reviews.llvm.org/D94961



More information about the cfe-commits mailing list