COMPOTE: Working On HMM/Compute For Open-Source NVIDIA Driver
HMM has long been in development and NVIDIA has been preparing to support their binary Linux driver with this new API while now open-source NVIDIA work via Nouveau is moving in this direction. As a reminder, this is about allowing device memory to be transparently used by any device process and to mirror process address space on a device. NVIDIA's GPUs now fully support this behavior, AMD can make use of HMM too if desired, and other areas of interest from FPGAs to other CUDA/OpenCL implementations. There's been a push to get the HMM patches mainline the past few kernel cycles, but it hasn't happen yet, in part for open-source "users" of this HMM functionality.
With this Nouveau implementation is also a related effort called "Compote" where they are working on bringing up compute support. The experimental Nouveau Compote Kconfig option explains, "Compote provide experimental API for GPU compute outside of nouveau reguler userspace API. It is experimental and it should not be use for any production development." The commit also explains, "Starting with Kepler GPU we can do unified memory for compute. With Pascal we can even transparently share the same virtual address space on the GPU as on the CPU. Compote is an attempt to prototype a new set of API for userspace to leverage those features."
There doesn't appear to be much of Compote yet as a Nouveau GPGPU compute-side implementation but most of the code so far is in regards to memory setup. Besides Jérôme Glisse of Red Hat working on this code, Ben Skeggs at Red Hat who is the Nouveau DRM maintainer has been working on the Nouveau bits including setting up code for virtual memory management.
This new, experimental code based off of HMM v25 can be found via this Git branch. Glisse also setup a Compote Git repository where he's working on the basics of the user-space API interface.