Fernando Sahmkow
2020-Mar-28 01:32 UTC
[Nouveau] Question on MME and Compute Subchannel in Kepler+
Hello everyone, I've been trying to adapt a switch emulator to emulate nouveau's compute. We've been told some things like indirect dispatch use the MME in Nouveau, however, looking at NVIDIA's open gpu documentation there's no MME in compute engine since Kepler. https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/compute/clb1c0.h MME for compute should still exist because of the presence of MME Shadow Memory Scratch registers. How does MME for Compute works on Kepler+ ? Does it use the 3D Subchannel? if so how do I know when its targeting the Compute Subchannel? -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20200327/fa7afd12/attachment.htm>
Ilia Mirkin
2020-Mar-28 02:11 UTC
[Nouveau] Question on MME and Compute Subchannel in Kepler+
I believe that there's a single shared resource for MME in GRAPH, not separate ones for separate classes. Ultimately, the classes just provide frontends for the single internal GRAPH engine. (This is probably also why setting some stuff on the compute class "unsets" it on the 3d class, or sometimes is directly visible.) For compute on Kepler+, you don't actually need to use macros for indirect compute dispatch -- the launch descriptor which contains the grid dimensions is in memory, and the technique used is to just use UPLOAD_EXEC to overwrite the necessary bits. (Small aside - Pascal got a new launch descriptor, I forget which gen switch is.) Check how nouveau does it in nve4_compute_upload_input (look for the info->indirect case). But you can see an example of a compute macro for Fermi (where there is no separate launch descriptor): https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nvc0/mme/com90c0.mme And it's installed the same way as all the "3d" macros are: https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c#n1429 As an aside, you may find this MME emulator useful in demmt. It's fully accurate, AFAIK: https://github.com/envytools/envytools/blob/master/demmt/macro.c Hope this helps! -ilia On Fri, Mar 27, 2020 at 9:34 PM Fernando Sahmkow <fsahmkow27 at gmail.com> wrote:> > Hello everyone, > > I've been trying to adapt a switch emulator to emulate nouveau's compute. We've been told some things like indirect dispatch use the MME in Nouveau, however, looking at NVIDIA's open gpu documentation there's no MME in compute engine since Kepler. https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/compute/clb1c0.h MME for compute should still exist because of the presence of MME Shadow Memory Scratch registers. > > How does MME for Compute works on Kepler+ ? Does it use the 3D Subchannel? if so how do I know when its targeting the Compute Subchannel? > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau