[cfe-dev] Parsing CUDA AST using clang

Aditya Atluri via cfe-dev cfe-dev at lists.llvm.org
Sat Mar 9 16:14:15 PST 2019


Hi Justin,
I don't know where to start even to understand the error. But would like to
dig deep more with some guidance.

After passing --cuda-device-only flag, I am seeing the following error:

$ ./Main add_tmp.cu --cuda-device-only

LLVM ERROR: CommonOptionsParser: failed to parse command-line arguments.
[CommonOptionsParser]: Main: Unknown command line argument
'--cuda-device-only'.  Try: './Main -help'

Main: Did you mean '-icp-invoke-only'?

On Sat, Mar 9, 2019 at 1:52 PM Justin Lebar <jlebar at google.com> wrote:

> Hi, there are three errors here.
>
> > error: cannot find libdevice for sm_20. Provide path to different CUDA
> installation via --cuda-path, or pass -nocudalib to build without linking
> with libdevice.
>
> > error: GPU arch sm_20 is supported by CUDA versions between 7.0 and 8.0
> (inclusive), but installation at /usr/local/cuda is 10.0.  Use --cuda-path
> to specify a different CUDA install, pass a different GPU arch with
> --cuda-gpu-arch, or pass --no-cuda-version-check.
>
> If you have ideas how to make these two errors more clear, patches welcome.
>
> > error: unable to handle compilation, expected exactly one compiler job
>
> Pass --cuda-device-only or --cuda-host-only.  Right now clang is trying to
> compile both for host and device, and that isn't going to work.
>
> On Sat, Mar 9, 2019 at 12:48 PM Aditya Atluri via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hi,
>> I am trying to make my toy ast matchers to parse cuda code. But I am
>> getting an error (log.txt)
>>
>>
>> --
>> - Aditya Atluri
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>

-- 
- Aditya Atluri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190309/2dda393d/attachment.html>


More information about the cfe-dev mailing list