[cfe-dev] How to emit device-side IR when compiling cuda?

Hugh Perkins via cfe-dev cfe-dev at lists.llvm.org
Sun Oct 2 11:08:20 PDT 2016


Yes, I figured it out in the end, just need `--cuda-device-only`,
https://github.com/hughperkins/cuda-ir-to-opencl/blob/18833aa40b69859c5ca24f22715ad3be2c029ff9/run-ir-to-opencl-demo.sh#L9


On Sun, Oct 2, 2016 at 6:59 PM, Anastasia Stulova <Anastasia.Stulova at arm.com
> wrote:

> Have you tried to pass the right target triple option?
>
>
> i.e. clang -target <target triple you need> ...
>
>
> ------------------------------
> *From:* cfe-dev <cfe-dev-bounces at lists.llvm.org> on behalf of Hugh
> Perkins via cfe-dev <cfe-dev at lists.llvm.org>
> *Sent:* 27 September 2016 00:15:53
> *To:* cfe-dev at lists.llvm.org
> *Subject:* Re: [cfe-dev] How to emit device-side IR when compiling cuda?
>
> I think I'm still in the wrong list.  I'll find the right list
> eventually...
>
> On Tue, Sep 27, 2016 at 12:15 AM, Hugh Perkins <hughperkins at gmail.com>
> wrote:
>
>> I'm trying:
>>
>> clang++-3.8 -I/usr/local/cuda-7.5/include llvm-sample.cu -emit-llvm -S
>> -o llvm-sample.ll
>>
>> This seems to emit host-side IR only?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161002/6e4affa2/attachment.html>


More information about the cfe-dev mailing list