<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi, Lorenz,</p>
<p>I recommend that you file a bug so that we can track this.<br>
</p>
<blockquote type="cite">/opt/llvm-5.0/lib/clang/5.0.0/include/cuda_wrappers/new:37:1:
error: unknown type name '__device__'<br>
__device__ inline void *operator new(__SIZE_TYPE__, void *__ptr)
CUDA_NOEXCEPT {</blockquote>
<br>
This certainly looks like a bug of some kind.<br>
<br>
-Hal<br>
<br>
<div class="moz-cite-prefix">On 08/29/2017 03:54 AM, Lorenz Braun
via cfe-dev wrote:<br>
</div>
<blockquote
cite="mid:caffd541-0484-e3db-11c0-76f2d570afae@ziti.uni-heidelberg.de"
type="cite">Hi there,
<br>
<br>
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.
<br>
<br>
Here is how the application is compiled:
<br>
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
<br>
<br>
This leads to several errors with the new and delete operator
defines in the cuda_wrapper of clang (see attachment).
<br>
<br>
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.
<br>
What do you think?
<br>
<br>
Regards
<br>
Lorenz
<br>
<br>
[0]
<a class="moz-txt-link-freetext" href="https://www.cs.virginia.edu/~skadron/wiki/rodinia/index.php/Main_Page">https://www.cs.virginia.edu/~skadron/wiki/rodinia/index.php/Main_Page</a>
<br>
[1] <a class="moz-txt-link-freetext" href="https://bugs.llvm.org/show_bug.cgi?id=30250">https://bugs.llvm.org/show_bug.cgi?id=30250</a>
<br>
[2] <a class="moz-txt-link-freetext" href="https://bugs.llvm.org/show_bug.cgi?id=26400">https://bugs.llvm.org/show_bug.cgi?id=26400</a>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>