Skip to content

Provide a nice wrapper over DeviceMemoryResource and _SynchronousMemoryResource #726

Open
@leofang

Description

@leofang

Need to check against Device().properties.memory_pools_supported to decide if we use DeviceMemoryResource or _SynchronousMemoryResource

Any chance we can turn this into a wrapper function, or just have DeviceMemoryResource() return the appropriate type when constructed?

Originally posted by @shwina in #717 (comment)

We could consider adding a helper function under the cuda.core.experimental.utils module. Later we might reimplement DeviceMemoryResource using cudax::device_memory_resource or cuda::device_memory_pool, so if we make DeviceMemoryResource to wrap both cudaMallocFromPoolAsync and cudaMalloc now, the re-implementation would become harder later.

Metadata

Metadata

Assignees

Labels

P1Medium priority - Should docuda.coreEverything related to the cuda.core moduleenhancementAny code-related improvements

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions