Is this a duplicate?
Type of Bug
Runtime Error
Component
cuda.core
Describe the bug
On a device where device.properties.host_memory_pools_supported is False, PinnedMemoryResource.allocate() returns a buffer instead of reporting that host memory pools are unsupported.
The first host-to-device transfer using the returned buffer then fails with CUDA_ERROR_INVALID_VALUE.
Synchronizing the stream immediately after allocation does not expose the failure earlier or change the result.
LegacyPinnedMemoryResource completes the same allocation and transfer sequence successfully.
This makes the transfer appear invalid even though the underlying limitation is that the stream's device does not support host memory pools.
How to Reproduce
- Use a CUDA device where
host_memory_pools_supported is False.
- Allocate pinned memory with
PinnedMemoryResource.
- Copy from the returned buffer to device memory.
- Observe
CUDA_ERROR_INVALID_VALUE.
Expected behavior
PinnedMemoryResource.allocate() should report that the stream's device does not support host memory pools instead of returning an unusable buffer.
The documentation should state this requirement and recommend LegacyPinnedMemoryResource when host memory pools are unavailable and stream-ordered allocation is not required:
System information
Operating System
- Jetson AGX Orin
- Jetson Linux R39.2
- Python 3.12.3
- CUDA 13.2.1
- cuda-core 1.1.0
- cuda-bindings 13.3.1
Is this a duplicate?
Type of Bug
Runtime Error
Component
cuda.core
Describe the bug
On a device where
device.properties.host_memory_pools_supportedisFalse,PinnedMemoryResource.allocate()returns a buffer instead of reporting that host memory pools are unsupported.The first host-to-device transfer using the returned buffer then fails with
CUDA_ERROR_INVALID_VALUE.Synchronizing the stream immediately after allocation does not expose the failure earlier or change the result.
LegacyPinnedMemoryResourcecompletes the same allocation and transfer sequence successfully.This makes the transfer appear invalid even though the underlying limitation is that the stream's device does not support host memory pools.
How to Reproduce
host_memory_pools_supportedisFalse.PinnedMemoryResource.CUDA_ERROR_INVALID_VALUE.Expected behavior
PinnedMemoryResource.allocate()should report that the stream's device does not support host memory pools instead of returning an unusable buffer.The documentation should state this requirement and recommend
LegacyPinnedMemoryResourcewhen host memory pools are unavailable and stream-ordered allocation is not required:System information
Operating System