[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 19 10:16:40 PDT 2017


tra added inline comments.


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:255-257
   CudaArch gpu_arch = StringToCudaArch(GPUArchName);
-  assert(gpu_arch != CudaArch::UNKNOWN &&
+  assert((gpu_arch != CudaArch::UNKNOWN ||
+          Args.hasArg(options::OPT_nocudalib)) &&
----------------
The purpose of the original assert was to catch a programming error and this change negates that purpose.
Perhaps I'm missing something. Could you elaborate on what's the motivation for this particular change?

I don't understand why it would be OK to end up with an unknown GPU architecture if -nocudalib is specified.
You still do want to pass *some* specific GPU arch to ptxas and that has nothing to do with whether you happen to have suitable libdevice.




Repository:
  rL LLVM

https://reviews.llvm.org/D37913





More information about the cfe-commits mailing list