Open kbenzie opened 1 year ago
In general, what are the current limitations of the virtual memory interfaces vs USM? Sergey mentioned memory pooling and features that are associated with that (memory tracking, etc.) but as I understand there might be more differences.
For example, do we allow calling urEnqueueUSMAdvise
or urEnqueueUSMFill
on memory that was mapped and allocated using virtual memory interfaces?
For example, do we allow calling urEnqueueUSMAdvise or urEnqueueUSMFill on memory that was mapped and allocated using virtual memory interfaces?
@steffenlarsen what are your thoughts on this question?
Optimally we would consider any device USM operation valid with a mapped virtual memory pointer. To my knowledge, both L0 and CUDA allow that.
In general, what are the current limitations of the virtual memory interfaces vs USM? For example, do we allow calling urEnqueueUSMAdvise or urEnqueueUSMFill on memory that was mapped and allocated using virtual memory interfaces?
Virtual memory and USM memory just differ on how they are allocated, but after that, they are expected to support same functionality and usage on other commands. That's my understanding on how CUDA supports it and it is how L0 does it.
All that virtual memory does is to grant finer control to applications, but shouldn't limit any functionality.
I think the main question is how to preserve memory tracking capabilities by UMF. Today UMF tracks its own allocations and later clients might easily get the corresponding pool by ptr and read various pool properties.
In https://github.com/oneapi-src/unified-runtime/pull/525 a number of virtual memory interfaces are added as part of supporting the
sycl_ext_oneapi_virtual_mem
extension. Discussion on the PR starting here points out concearns that USM and these new virtual memory interfaces are not currently well integrated.This issue exists to track the discussion about how to meld the USM and Virtual Memory interfaces to interoperate nicely, likley in the adapter implementations, to retain memory tracking capabilities currently available in USM across all memory interfaces.