[Openmp-commits] [PATCH] D69857: [libomptarget] Replace INLINE with DEVICE to work around nvcc deleting always_inline symbols

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 5 10:29:12 PST 2019


ABataev added a comment.

In D69857#1734288 <https://reviews.llvm.org/D69857#1734288>, @JonChesterfield wrote:

> In D69857#1734286 <https://reviews.llvm.org/D69857#1734286>, @ABataev wrote:
>
> > What about the inlining, will it affect it?
>
>
> I've given up on guessing what nvcc will do. Changing the INLINE macro to `__inline__` (and away from the possibly buggy `__always_inline__`) is a nicer fix if it works.
>
> Working theories:
>
> - nvcc requires declaration and definition to have identical attributes
> - nvcc `__always_inline__` is broken
> - nvcc changes the semantics of code based on #include hierarchy
>
>   I'm still trying to reproduce the missing symbols locally so don't have much scope for experimentation.


Try to replace with `__inline__`, I will try this patch locally with my version of Cuda. Also, I don't think it is nvcc, I think we get something bad with clang/LLVM inlining, when we try to link against .bc library.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69857





More information about the Openmp-commits mailing list