The backend currently does not carry any information like this explicitly.  The goal is to represent a single thread in LLVM IR, and generate the appropriate thread-level PTX code.  At that level, the number of threads per block and blocks per grid is irrelevant.  If you need that information, you're better off feeding it directly into your compiler/optimizer.  We can (and should) carry around explicitly stated block size constraints representable in PTX, but that's a bit different.<br>
<br><div class="gmail_quote">On Thu, Mar 15, 2012 at 2:47 AM, Che-Liang Chiou <span dir="ltr"><<a href="mailto:clchiou@gmail.com">clchiou@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't think so, but you should check source code.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Mar 13, 2012 at 9:58 PM, Xin Tong <<a href="mailto:xerox.time.tech@gmail.com">xerox.time.tech@gmail.com</a>> wrote:<br>
> but does it have default values ?<br>
><br>
> Thanks<br>
><br>
> Xin<br>
><br>
> On Tue, Mar 13, 2012 at 5:19 AM, Che-Liang Chiou <<a href="mailto:clchiou@gmail.com">clchiou@gmail.com</a>> wrote:<br>
>> You specify shader model, bit size and etc. arch-specified parameters<br>
>> though -march, -mattr and -mcpu, but AFAIK, PTX backend does not use<br>
>> the GPU thread/block/grid size information in optimization yet.<br>
>><br>
>> On Mon, Mar 12, 2012 at 8:17 PM, Xin Tong <<a href="mailto:xerox.time.tech@gmail.com">xerox.time.tech@gmail.com</a>> wrote:<br>
>>> I am wondering that how does the LLVM PTX backend find out the<br>
>>> constraints on executing GPU thread/block/grid size ( i.e. a block can<br>
>>> at most have 1024 threads). Can anyone point me to the code ? I need<br>
>>> information in the optimizer,  how can I get it ?<br>
>>><br>
>>> Thanks<br>
>>><br>
>>> Xin<br>
>>> _______________________________________________<br>
>>> LLVM Developers mailing list<br>
>>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>