This work adds a new op gpu.alloc_managed that allocates memory region whose pointer is visible to GPU and CPU. It is similar to memref.alloc however the data is migrated automatically between GPU and CPU by the driver via page faults or underlying software.
gpu.alloc_managed works synchronous fashion, not async. Therefore, it cannot be mapped to existing gpu.alloc that can be executed asynchronously. Note that: the gpu.alloc has host_shared option, which is not used anywhere. I am not sure what the intend was there.