[Openmp-dev] Declare variant + Nvidia Device Offload
Johannes Doerfert via Openmp-dev
openmp-dev at lists.llvm.org
Wed May 20 09:40:45 PDT 2020
On 5/20/20 11:19 AM, Jonas Hahnfeld wrote:
> Am Dienstag, den 19.05.2020, 17:50 +0200 schrieb Lukas Sommer via
> Openmp-dev:
>> Hi Johannes,
>>
>>> Yes, we need to replace the dot with either of the symbols you
>>> mentioned. If we can use the same symbols on the host, I'm fine with
>>> chaining it unconditionally.
>> I've prototyped this change locally, replacing the dot with a
>> dollar-sign in the places you mentioned. With this change, declaring
>> variants for offloading to CUDA devices works for my testcase in my
>> setup (ARM + Nvidia SM 7.2).
>>
>> If you want, I could create a patch for that, but do you (or anyone else
>> on the list) know whether the other offloading targets (AMDGPU, NEC VE,
>> ...) are all able to handle the dollar sign in the mangled name, so we
>> could make this change unconditionally? I do not have a setup for each
>> of these to test.
>>
>> I was also wondering if legalizing the mangled name shouldn't be handled
>> by the backend (NVPTX in this case) instead of the OpenMP-specific parts.
> For some context on this, see the following set of reviews:
> https://reviews.llvm.org/D17738
> https://reviews.llvm.org/D29883
> https://reviews.llvm.org/D39005
> https://reviews.llvm.org/D40573
>
> My favorite statement from the last patch: "This is silly. This bug has
> been open for so long that nvidia could've just fixed their toolchain
> by now to accept dots in symbol names."
Thanks for the links!
I think in those reviews people also concluded you cannot/should not
modify visible symbol names late.
I guess, since we have _$_ in other cases we should do _$_ as separator
in Clang too. WDYT?
>
> Jonas
More information about the Openmp-dev
mailing list