Draft: rusticl: implement cl_ext_buffer_device_address
This adds all the code to implement cl_ext_buffer_device_address
in a sane way. This will be required by chipStar (HIP on CL) as an alternative path besides to SVM.
The old set_global_binding
interface was already kinda terrible, but for cl_ext_buffer_device_address
it was purely unusable. With the new added interfaces here a frontend can simply query the GPU address of a pipe_resource
and rely on that address to stay the same. As this implements a bindless model the frontend is now also responsible to pass a list of potentially used resources alongside launch_grid
. This also allows buffers to keep addresses to other buffers across invocations to allow more flexible use cases (e.g. implementing HIP without relying on SVM for the same thing).
Also, this means drivers won't have to keep track of used buffers anymore simplifying compute support by quite a bit.
Todo:
-
update with https://github.com/pocl/pocl/pull/1449