[PATCH] D77954: [CUDA][HIP] Fix host/device based overload resolution

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 5 14:36:09 PDT 2020


tra added a comment.

In D77954#2021299 <https://reviews.llvm.org/D77954#2021299>, @yaxunl wrote:

> I will put a workaround: In device compilation, in implicit `__device__ __host__` callers, I will keep the old behavior, that is, implicit `__device__ __host__` candidate has equal preference with wrong-sided candidate. By doing this, we will in most cases resolve the overloading the same way as if the callers and callees are host functions, therefore resolved the same way as in their expected environment. This will make sure: 1. we will not end up with no viable candidate 2. we will not have ambiguity, since we know it is resolvable in host compilation.


LMK when you have something. I can give it a spin internally.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77954





More information about the cfe-commits mailing list