Summary
On platforms where CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS is 0 (e.g., certain Windows/WSL configurations), Unified Memory cannot be safely accessed from the host while any GPU kernel is in flight on any stream. This makes ManagedMemoryResource effectively unusable in general-purpose code on these platforms.
Proposed Changes
- Runtime warning: When
ManagedMemoryResource is created, query CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If it is 0, emit a prominent warning stating that host access to managed memory requires explicit synchronization at every point or the process will segfault, with a link to the CUDA Programming Guide.
- Test coverage: Skip managed memory tests on affected platforms.
Context
See discussion in #1539.
Summary
On platforms where
CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESSis 0 (e.g., certain Windows/WSL configurations), Unified Memory cannot be safely accessed from the host while any GPU kernel is in flight on any stream. This makesManagedMemoryResourceeffectively unusable in general-purpose code on these platforms.Proposed Changes
ManagedMemoryResourceis created, queryCU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If it is 0, emit a prominent warning stating that host access to managed memory requires explicit synchronization at every point or the process will segfault, with a link to the CUDA Programming Guide.Context
See discussion in #1539.