Skip to content

Conversation

@Hugobros3
Copy link
Contributor

The SVM code in master assumes SVM support is only available when the major version is two, and assumes fine-grained capabilities (notably by using host memcpy to implement all copies). This seems to be a legacy quick and dirty hack to support Intel integrated GPUs.

Intel's OpenCL drivers now support version 3, and the dedicated GPUs don't advertise fine-grained SVM (on my test setup anyway). Moreover, there are now other drivers, such as Mesa's rusticl, which support coarse-grained SVM.
Even coarse-grained SVM has big advantages over OpenCL 1.x memory objects: because we obtain actual pointers, we can perform pointer arithmetic on the host and get correct behavior.

This PR also adds a couple of experimental interfaces to map/unmap SVM regions. I'm not sure about these interfaces. I'm also not sure about what to do wrt host versus device copies. Finally, I'd like to add Vulkan runtime support next, and while Vulkan doesn't support SVM, it does support buffer_device_address which has similar utility wrt pointer arithmetic. It might be a good time to re-think how the runtime API works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants