[Openmp-commits] [PATCH] D95466: [OpenMP][NVPTX] Drop dependence on CUDA to build NVPTX `deviceRTLs`

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 26 13:03:49 PST 2021


tianshilei1992 added a comment.

In D95466#2523434 <https://reviews.llvm.org/D95466#2523434>, @JonChesterfield wrote:

> That seems OK, if a bit inefficient. I believe it's only target_impl.cpp that cares about ptx version, so we could reduce the build time by compiling everything else once per SM and using llvm-link to create each output library from the common base plus the ptx-specific target_impl

Only `target_impl.cu` cares about the macro, but every time we invoke the compiler, we need to pass `-target-cpu sm_xx`. I'm not sure it's safe to assume for other code it is safe to use an arbitrary SM number.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95466



More information about the Openmp-commits mailing list