NVIDIA / NVIDIA/cccl

[FEA]: Support cupy.cuda.memory.MemoryPointer for temporary allocation needed by cuda.parallel algorithms

Open
#3,788 1 comment 0 reactions 0 assignees View on GitHub
cuda.compute
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

### Is this a duplicate?

- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Area

Thrust

### Is your feature request related to a problem? Please describe.

At the moment, we do `temporary_storage = cp.empty(temp_storage_bytes, dtype=cp.uint8)` while we could do `temporary_storage = cp.cuda.memory.alloc(temp_storage_bytes)` to avoid additional overhead of instantiating object of type `cupy.ndarray`.

### Describe the solution you'd like

Python API for `cuda.parallel` algorithms should support specifying temporary storage as `cupy.cuda.memory.MemoryPointer` in addition to supporting specifying it as contiguous `cupy.ndarray` object.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.