<div dir="ltr">Previously when I started with installation of LLVM and CUDA, I had a very bad time with the error "Unsupported CUDA version!". I remember it now and dig down a bit into the LLVM source code. In the LLVM file <i>llvm/tools/clang/lib/Headers/__clang_cuda_runtime_wrapper.h </i><div><i>(<a href="http://clang.llvm.org/doxygen/cuda__runtime_8h_source.html">http://clang.llvm.org/doxygen/cuda__runtime_8h_source.html</a>)</i> </div><div>there is a check for the CUDA_VERSION and it allows only versions between 7 and 7.05. So is there a handy way of checking this file for previous LLVM versions so that I can avoid heading into a catastrophe which I am certain about and give a better chance for success...</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 3:34 PM, C Bergström <span dir="ltr"><<a href="mailto:cbergstrom@pathscale.com" target="_blank">cbergstrom@pathscale.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think you may have answered your own question - If CUDA 7.5 doesn't<br>
support sm_10 then you'll eventually hit that as a problem. So yes if<br>
possible make sure you're installing a version of CUDA toolkit which<br>
supports the target you need.<br>
<br>
I'm not certain the exact compilation flow when fighting this, but<br>
ensure the underlying nvcc and ptxas work first for sm_10 before<br>
trying to get llvm involved.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Jun 2, 2016 at 3:23 PM, ginu jacob <<a href="mailto:ginujacob10@gmail.com">ginujacob10@gmail.com</a>> wrote:<br>
> Hello Bergström/Eric,<br>
><br>
> Thanks for the reply. The G80(sm_10) architecture was ported on FPGA by a<br>
> group of researchers<br>
> (<a href="http://www.ecs.umass.edu/ece/tessier/andryc-fpt13.pdf" rel="noreferrer" target="_blank">http://www.ecs.umass.edu/ece/tessier/andryc-fpt13.pdf</a>). Our group have some<br>
> further research interest on this work. I was working on modifying the<br>
> Clang-LLVM for a couple of months and achieved the required changes. But<br>
> Clang-LLVM is only allowing me to generate PTX for sm_20, sm_30 etc.While<br>
> trying to generate PTX for sm_10, it gave<br>
><br>
> error: unknown target CPU 'sm_10'<br>
> fatal error: cannot open file '/tmp/shared-395893.s': No such file or<br>
> directory<br>
> 1 error generated.<br>
><br>
><br>
> The compilation command used is:<br>
> clang -Xclang -I$LIBCLC/include/generic -I$LIBCLC/include/ptx<br>
> -Dcl_clang_storage_class_specifiers -O3 CudaSource.cu -S -o PtxOutput.ptx<br>
> --cuda-gpu-arch=sm_10<br>
><br>
> Is there any chance that this error being generated from CUDA runtime alone<br>
> since I am using CUDA 7.5 which does not support sm_10. If there is any<br>
> chance that the error is isolated from LLVM and is only due to CUDA, i have<br>
> some hope to use a lower CUDA version. Please let me know your suggestions.<br>
><br>
> Thank you,<br>
> Ginu<br>
><br>
><br>
> On Thu, Jun 2, 2016 at 2:36 PM, C Bergström <<a href="mailto:cbergstrom@pathscale.com">cbergstrom@pathscale.com</a>><br>
> wrote:<br>
>><br>
>> What happens if you hack change llvm to accept sm_10? Do you get an<br>
>> error somewhere further down the pipeline?<br>
>><br>
>> sm_10 is pretty old hardware - Why the strong dependency on this?<br>
>><br>
>> On Thu, Jun 2, 2016 at 1:18 PM, ginu jacob via llvm-dev<br>
>> <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> > Hello,<br>
>> ><br>
>> > When generating the PTX output from CUDA file(.cu file), the minimum<br>
>> > target<br>
>> > that is accepted by LLVM is sm_20. But I have a specific requirement to<br>
>> > generate PTX output for compute capability 1.0 (sm_10). Is there any<br>
>> > previous version of LLVM supporting this?<br>
>> ><br>
>> > Thank you,<br>
>> > Ginu<br>
>> ><br>
>> > _______________________________________________<br>
>> > LLVM Developers mailing list<br>
>> > <a href="mailto:llvm-dev@lists.llvm.org">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>
><br>
</div></div></blockquote></div><br></div>