You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ManagedMemoryResource() without options fails when the default pool does not support managed allocations #1617
ManagedMemoryResource() (no options) attempts to retrieve the current memory pool via cuMemGetMemPool with CU_MEM_ALLOCATION_TYPE_MANAGED. On platforms where the default pool does not support managed allocations, this fails with a cryptic error:
CUDAError: CUDA_ERROR_NOT_SUPPORTED: This error indicates that the attempted operation is not supported
on the current system or device.
Meanwhile, ManagedMemoryResource(options=ManagedMemoryResourceOptions(preferred_location=0)) works on the same platform because it creates a new managed pool via cuMemPoolCreate.
Improve the error message so users understand what went wrong, and investigate whether the API should handle this case more gracefully (e.g., by falling back to pool creation).
On WSL2 x86_64 (concurrent_managed_access=False, memory_pools_supported=True):
ManagedMemoryResource() ...
failed: CUDA_ERROR_NOT_SUPPORTED: This error indicates that the attempted
operation is not supported on the current system or device.
ManagedMemoryResource(options=ManagedMemoryResourceOptions(preferred_location=0)) ...
succeeded (device_id=0)
On Linux x86_64 (concurrent_managed_access=True, memory_pools_supported=True):
Investigate whether the API should handle this case more gracefully (e.g., by falling back to pool creation).
Falling back to pool creation is not the right behavior for two reasons. First, the behavioral difference between platforms with and without concurrent managed access would be surprising and unexpected. Second, if the driver ever added support for this feature on platforms that currently lack it, then there would be no clean migration path away from pool creation back to the default pool.
Activity
Andy-Jost commentedon Mar 30, 2026
Falling back to pool creation is not the right behavior for two reasons. First, the behavioral difference between platforms with and without concurrent managed access would be surprising and unexpected. Second, if the driver ever added support for this feature on platforms that currently lack it, then there would be no clean migration path away from pool creation back to the default pool.