WIP: Implement __setitem__ for DeviceBuffer#351
Conversation
|
Please update the changelog in order to start CI tests. View the gpuCI docs here. |
|
What is this doing? |
|
Initially PR ( dask/distributed#3732 ) was using Numba to view and write into |
|
Can you explain what |
|
|
| rng = range(self.size)[key] | ||
| if not isinstance(rng, range): | ||
| rng = range(rng, rng + 1) |
There was a problem hiding this comment.
We should probably handle negative slices / scalars here
There was a problem hiding this comment.
Negative indices are normalized by slicing the range object.
In [1]: range(5)[-1]
Out[1]: 4Currently we are raising an error for negative indices or any other step size that is not 1 since this could be a bit tricky to do in practice and it's unclear if we have use cases for those yet.
|
@jakirkham @kkraus14 what are the plans for this? Moving to 0.16. |
|
I think we still want this. Has slipped lately though due to other priorities. Will take a look after the release. |
|
This PR has been marked rotten due to no recent activity in the past 90d. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. |
|
This PR has been marked stale due to no recent activity in the past 30d. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be marked rotten if there is no activity in the next 60d. |
|
@jakirkham @kkraus14 can we close this? |
|
Yes, closing this for now. Feel free to reopen if desired. |
|
Yeah sounds good. I think people can probably just use CuPy or Numba for this today |
This is a rough first pass at implementing
__setitem__forDeviceBuffer. It works based on a quick check, but the error handling could be improved.