Skip to content

rusticl: fix multi-device memory allocations

This series generally fixes cl_mem objects allocated within a multi device context. It's doing so by migrating the content of memory allocations transparently between devices on demand. There are some potential ways of improving the implementation by e.g. using a mapped resource from one device to feed it into buffer_subdata or to use dma-buf to import it on the device side. This will also be useful to properly implement SVM as an SVM pointer can also be used via CL_MEM_USE_HOST_PTR and that's currently broken on my SVM prototype, hence this series to fix it up.

However I focused mostly on correctness here and perf optimization can wait for later as especially multi-device contexts are kinda of a niche use case within the scope of mesa.

Todo:

  • special case host ptr allocations.
  • support host ptr shadow allocations in Allocation?

Depends on !32821 (merged)

Edited by Karol Herbst

Merge request reports

Loading