[Nouveau] NV50 compute support questions

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Nov 20 08:07:06 PST 2015



On 11/20/2015 11:36 AM, Hans de Goede wrote:
> Hi Samual, et al,

Hi Hans,

>
> In
> http://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/drivers/nouveau?id=ff72440b40211326eda118232fabd53965410afd
>
> you write: "This compute support has been tested by
> Pierre Moreau and myself with some compute kernels."
>
> Can you provide testing instructions (and the
> necessary files) so that I can try to reproduce
> your tests ?
>
> And once I've reproduced your tests, the next
> question is where / how did you get the compute
> kernels for testing. I guess you manually wrote them ?

Yeah, I wrote those compute kernels directly in assembly by hand.

I already said few days ago, you have some examples in 
src/gallium/tests/trivial/compute.c which show how to use that compute 
support stuff with TGSI kernels and without clover. Because clover is 
not currently able to do OpenCL -> TGSI using Clang/LLVM, you can't 
really use your backend directly.

An other way to achieve what you need is to copy/paste your TGSI kernel 
in src/gallium/tests/trivial/compute.c, set up the global buffers and 
other stuff (maybe samplers, textures and so on) yourself. This is a bit 
painful but should work as expected.

>
> As you know I'm working on a llvm tgsi backend,
> it actually produces some output now, if you want
> to take a peek it lives here:
> http://cgit.freedesktop.org/~jwrdegoede/llvm

I'm currently building your TGSI branch. :-)

>
> Before working further on this I want to take
> a bottom up approach, so I want to first make
> sure we've working TGSI -> compute-kernel and
> compute-kernel -> hardware steps. So the next
> question is, do you know if we can go from
> (manually written) TGSI to a compute-kernel
> using say nouveau-compiler ?

Sure, you can use nouveau-compiler to convert TGSI to NV50 IR, but as I 
said, you can't directly execute your compute kernel without setting a 
ton of stuff before... That's a bunch of fun! :-)

Btw, do you still need compute support on your GK208? or did you have an 
other card for testing ?

>
> And if not, do you know what is missing to do
> this?
>
> Thanks & Regards,
>
> Hans


More information about the Nouveau mailing list