<div dir="ltr"><div dir="ltr"><div dir="ltr">>  I can obtain axpy.exe correctly. However, the results are "y[0] = 0, y[1] = 0, y[2] = 0, y[3] = 0", which are not correct. I will be very glad to have comments from you. </div><div dir="ltr"><br></div><div>It probably is not launching the kernel successfully.  You'll need to add error checking and then figure out why you're getting an error from CUDA.</div><div><br></div><div>> By the way, is it also possible to have a pre-built binary for msys2 (64bits) on windows?</div><div><br></div><div>All of these things are community-driven, so if it's not there already, you may be the best person to provide it.  :)</div><div><br></div><div>-Justin</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 13, 2019 at 4:53 PM Finite Tsai <<a href="mailto:tsaichiacheng@gmail.com">tsaichiacheng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><div class="gmail_attr">Dear llvm friends and Justin:</div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>I tried clang 7.0.1 from the <a href="http://releases.llvm.org/download.html#7.0.1" target="_blank">pre-built binariy of windows (64bit)</a> and cuda 8.0 to build <a href="http://axpy.cu" target="_blank">axpy.cu</a> in the <a href="https://llvm.org/docs/CompileCudaWithLLVM.html" target="_blank">website</a>. I use the following command: clang++ <a href="http://axpy.cu" target="_blank">axpy.cu</a> -o axpy.exe --cuda-gpu-arch=sm_35 -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64" -lcudart_static. The compiler indicated two types of bugs as "undefined FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, & FP_NORMAL" and "conflicts of isnan, isfinite, & isinf". I patched them by the attached files. Then, I can obtain axpy.exe correctly. However, the results are "y[0] = 0, y[1] = 0, y[2] = 0, y[3] = 0", which are not correct. I will be very glad to have comments from you. <br></div><div><br></div><div>By the way, is it also possible to have a pre-built binary for msys2 (64bits) on windows? I suppose that it should be very similar to a linux system except reimp should be used to convert the cuda .lib files to the corresponding .a files. I have used the method to obtain libopencl.a, and it works perfectly well on my Nvidia GPU + msys2/mingw64/clang5 + opencl system as I tested all the examples from <a href="http://viennacl.sourceforge.net/" target="_blank">viennaCL</a>.</div><div><br></div><div>best regard</div><div>Tsai</div><div><div><div><br></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 4, 2018 at 6:11 AM Justin Lebar <<a href="mailto:jlebar@google.com" target="_blank">jlebar@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, Tsai,<br>
<br>
Can you try a newer version of clang and CUDA?<br>
<br>
-Justin<br>
On Thu, May 3, 2018 at 1:20 AM Finite Tsai <<a href="mailto:tsaichiacheng@gmail.com" target="_blank">tsaichiacheng@gmail.com</a>> wrote:<br>
<br>
<br>
> Hi, Justin,<br>
<br>
> Attached files are my code and results. Please give me some comments.<br>
Alternatively, can you tell me how are your simple clang builds to work?<br>
<br>
> best regard<br>
> Tsai<br>
<br>
<br>
> On Wed, May 2, 2018 at 2:30 AM, Justin Lebar <<a href="mailto:jlebar@google.com" target="_blank">jlebar@google.com</a>> wrote:<br>
<br>
>> Hi, Tsai.<br>
<br>
>> I've gotten simple clang builds to work with cuda on Windows.  I didn't<br>
use<br>
>> mingw, though.<br>
<br>
>> Unfortunately your email does not have enough information to allow me to<br>
>> assist you further than that.<br>
<br>
>> -Justin<br>
>> On Tue, May 1, 2018 at 7:06 AM Finite Tsai via llvm-dev <<br>
>> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
<br>
<br>
>> > Dear all,<br>
<br>
>> > In the official document, it is mentioned that  CUDA compilation is<br>
>> supported on Windows as of 2017-01-05. I used msys2 to install clang<br>
5.0.1.<br>
>> Then I installed cuda 8.0. However, I basically could not compile any<br>
code<br>
>> of cuda by the prescribed setting. I wounder if anyone can successfully<br>
>> compile cuda code by the clang on Windows. Any of your information is<br>
>> highly appreciated, and<br>
<br>
>> > best regards<br>
>> > Tsai<br>
<br>
>> > _______________________________________________<br>
>> > LLVM Developers mailing list<br>
>> > <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
<br></blockquote></div></div></div><br></div>
</blockquote></div>