ndarray.set() is dramatically slower when the input is a non contiguous array
Open
cat:performance
st:needs-discussion
- Dominant language
- Python
- Stars
- 12.3k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 45
Description
### Description
.set() is much slower when the input is slice of a multidimensional array. I think the offending line is
https://github.com/cupy/cupy/blob/f0d0e7b2675a232c12e59badd5a6c42c5815ef1c/cupy/_core/core.pyx#L1779
I think using this function hurts performance by having to do this reshuffle, and furthermore if the original arrays are in pinned memory then this logic isn't preserving the pinned memory benefit.
### To Reproduce
```py
# Write the code here
```
### Installation
_No response_
### Environment
```
# Paste the output here
```
### Additional Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.