[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 15:21:11 PDT 2017


tra added a comment.

I'm not particularly familiar with OpenMP internals. Could you elaborate on why libdevice would not be needed with -c for the OpenMP case?
Is that because it would only apply to the host compilation and that nothing will be compiled for the openmp targets?
Does openmp allow separate compilation for the target (i.e. something similar to what --cuda-device-only does?)



================
Comment at: test/Driver/openmp-offload-gpu.c:133
+/// Check that the flag is passed when -fopenmp-relocatable-target is used.
+// RUN:   %clang -### -c -S -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_99 -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHK-NOLIBDEVICE %s
----------------
I'd have separate runs -- one with -S and another one with -c.

That would cover openMP compilation changes. There should also be similar test to verify new behavior for CUDA compilation.


Repository:
  rL LLVM

https://reviews.llvm.org/D37914





More information about the cfe-commits mailing list