Provide a nice wrapper over `DeviceMemoryResource` and `_SynchronousMemoryResource`
@shwina arbeitet bereits daran.
Seit 25.6.2025.
- Vorherrschende Sprache
- Cython
- Sterne
- 3.4k
- Forks
- 329
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 116
Beschreibung
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 https://github.com/NVIDIA/cuda-python/pull/717#discussion_r2167323036
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.