[Openmp-dev] How to change/add target device architecture for OpenMP GPU Offload

Jonas Hahnfeld via Openmp-dev openmp-dev at lists.llvm.org
Wed Aug 8 10:06:45 PDT 2018


Do you mean by passing the same target multiple times to 
-fopenmp-targets? I think the targets are deduplicated, so you can't use 
that to build for multiple (GPU) architectures.

On 2018-08-08 15:02, Guray Ozen wrote:
> Thanks Jonas! It works great! I couldn't figure it out by myself.
> If you define multiple target triple, can you target multiple device
> architectures?
> 
> -----Original Message-----
> From: Jonas Hahnfeld <hahnjo at hahnjo.de>
> Sent: Tuesday, August 7, 2018 3:23 PM
> To: Guray Ozen <gozen at nvidia.com>
> Cc: openmp-dev at lists.llvm.org
> Subject: Re: [Openmp-dev] How to change/add target device architecture
> for OpenMP GPU Offload
> 
> Hi,
> 
> you can pass -Xopenmp-target -march=sm_60 to target Pascal GPUs, for 
> example.
> Another option would be to build Clang with
> -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_60 which changes the default 
> architecture.
> 
> At the moment OpenMP offloading isn't able to target more than one 
> architecture.
> 
> Cheers,
> Jonas
> 
> On 2018-08-07 14:10, Guray Ozen via Openmp-dev wrote:
>> Hello Everyone,
>> 
>> I have quick questions. Firstly, how can I change target device
>> architecture? I have quick questions. Firstly, how can I change target
>> device architecture? As far as I understood, clang uses sm_35 as
>> default, if I don't change anything. Another question is that, can I
>> produce an executable using multiple device architectures?
>> 
>> Thanks in advance
>> 
>> Best
>> 
>> -------------------------
>> 
>> This email message is for the sole use of the intended recipient(s)
>> and may contain confidential information.  Any unauthorized review,
>> use, disclosure or distribution is prohibited.  If you are not the
>> intended recipient, please contact the sender by reply email and
>> destroy all copies of the original message.
>> 
>> -------------------------
>> _______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list