<div class="gmail_quote">2011/12/14 Pekka Jääskeläinen <span dir="ltr"><<a href="mailto:pekka.jaaskelainen@tut.fi">pekka.jaaskelainen@tut.fi</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 12/14/2011 02:41 PM, Justin Holewinski wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would favor calling conventions over metadata for the simple reason<br>
that this maps more cleanly to the device model.  Device and kernel<br>
functions are represented differently in PTX, including (sometimes) the<br>
way parameters are passed.<br>
</blockquote>
<br></div>
For the record, marking the kernels with "calling conventions" instead<br>
of metadata is fine also for the pocl use case. It's enough if there is a way<br>
to differentiate OpenCL C kernels from the "device functions" for the reason<br>
I discussed in the previous email. That is, in the pocl point of view we just<br>
need a way to pick the "host-callable" kernel functions as they need the<br>
special treatment before they can be called (like a C function).<br>
<br>
BTW what about the other OpenCL data like required_wg_size which<br>
affect the possible "kernel treatment" of pocl and can be converted to some<br>
special instructions (I suppose) for the SIMT targets? Currently only the<br>
TCE target in Clang adds metadata for the required_wg_size kernel<br>
attribute (as we need it in "offline compilation") but IMHO that could be<br>
useful in general, as a default metadata (to enable its support in pocl<br>
for all targets, for example).</blockquote><div><br></div><div>Ideally, we would need some standard way of representing this in Clang.  The back-end would then need to convert it to whatever form the target OpenCL run-time expects.</div>
<div><br></div><div>This is a question for cfe-dev.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Pekka<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>