[cfe-dev] CUDA Compilation Issue - Possible bug?
Lorenz Braun via cfe-dev
cfe-dev at lists.llvm.org
Wed Aug 30 06:47:37 PDT 2017
I have filed the bug. You can find it here:
https://bugs.llvm.org/show_bug.cgi?id=34379
Regards
Lorenz
Am 30.08.17 um 14:36 schrieb Hal Finkel:
>
> Hi, Lorenz,
>
> I recommend that you file a bug so that we can track this.
>
>> /opt/llvm-5.0/lib/clang/5.0.0/include/cuda_wrappers/new:37:1: error:
>> unknown type name '__device__'
>> __device__ inline void *operator new(__SIZE_TYPE__, void *__ptr)
>> CUDA_NOEXCEPT {
>
> This certainly looks like a bug of some kind.
>
> -Hal
>
> On 08/29/2017 03:54 AM, Lorenz Braun via cfe-dev wrote:
>> Hi there,
>>
>> i am currently using clang/clang++ to compile the CUDA part of the
>> rodinia benchmarksuite [0]. Besides some already known bugs regarding
>> the use of texture memory [1],[2] i have found another problem. It is
>> only occurring for the CUDA version of the streamcluster application.
>>
>> Here is how the application is compiled:
>> clang++ --cuda-path=/opt/cuda-8.0 -lcudart -I/opt/cuda-8.0/include
>> -O3 streamcluster_cuda_cpu.cpp streamcluster_cuda.cu
>> streamcluster_header.cu -o sc_gpu
>>
>> This leads to several errors with the new and delete operator defines
>> in the cuda_wrapper of clang (see attachment).
>>
>> There is a workaround though. Compiling the source files in separate
>> objects and linking them afterwards works just fine. Therefore i am
>> not sure if this might be a bug.
>> What do you think?
>>
>> Regards
>> Lorenz
>>
>> [0]
>> https://www.cs.virginia.edu/~skadron/wiki/rodinia/index.php/Main_Page
>> [1] https://bugs.llvm.org/show_bug.cgi?id=30250
>> [2] https://bugs.llvm.org/show_bug.cgi?id=26400
>>
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
> --
> Hal Finkel
> Lead, Compiler Technology and Programming Languages
> Leadership Computing Facility
> Argonne National Laboratory
--
Lorenz Braun
Research Associate
Institute of Computer Engineering (ZITI)
B6, 26, Building B, Office B2.20
68131 Mannheim
Phone: +49-621-181-2696
lorenz.braun at ziti.uni-heidelberg.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170830/0146b0fb/attachment.html>
More information about the cfe-dev
mailing list