[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 19 10:18:00 PDT 2021


tra added a comment.

In D98902#2636308 <https://reviews.llvm.org/D98902#2636308>, @jdoerfert wrote:

> @tra, so you think we should not do this? The user will see a link error late I assume, might be better.

If I compile a `__device__ float foo(float f) { return sin(f); }` and it does compile to working GPU code, I If I compile the same code with `-S`, I would assume that produced PTX is still compileable with ptxas. After all, it was when the source was compiled with `-c`. That will no longer be the case if you disable linking with libdevice.

If the user wants to disable linking with the libdevice, there's already `-nogpulib` for that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98902



More information about the cfe-commits mailing list