Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RELEASE] cucim v22.04 #260

Merged
merged 25 commits into from
Apr 6, 2022
Merged

[RELEASE] cucim v22.04 #260

merged 25 commits into from
Apr 6, 2022

Conversation

raydouglass
Copy link
Member

❄️ Code freeze for branch-22.04 and v22.04 release

What does this mean?

Only critical/hotfix level issues should be merged into branch-22.04 until release (merging of this PR).

What is the purpose of this PR?

  • Update documentation
  • Allow testing for the new release
  • Enable a means to merge branch-22.04 into main for the release

raydouglass and others added 24 commits January 13, 2022 10:40
[gpuCI] Forward-merge branch-22.02 to branch-22.04 [skip gpuci]
[gpuCI] Forward-merge branch-22.02 to branch-22.04 [skip gpuci]
[gpuCI] Forward-merge branch-22.02 to branch-22.04 [skip gpuci]
[gpuCI] Forward-merge branch-22.02 to branch-22.04 [skip gpuci]
[gpuCI] Forward-merge branch-22.02 to branch-22.04 [skip gpuci]
[gpuCI] Forward-merge branch-22.02 to branch-22.04 [skip gpuci]
[gpuCI] Forward-merge branch-22.02 to branch-22.04 [skip gpuci]
This PR fixes an issue with the doc builds. `get_html_theme_path()` was removed in the commit below. After some local testing, it seems that the lines in this PR can be removed without any issues.

- pydata/pydata-sphinx-theme@579d7ce

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - https://github.com/jakirkham

URL: #218
Fixes #192 

Signed-off-by: Gigon Bae <gbae@nvidia.com>

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - https://github.com/jakirkham

URL: #227
In the near future, the [rapidsai/ops-bot](https://github.com/rapidsai/ops-bot) GitHub application that we use for GitHub automation will be enabled on all repositories in the `rapidsai` GitHub organization. Since not all features of the application are applicable to all repositories, this PR adds a new file, `.github/ops-bot.yaml`, which can configure which features are enabled per repository.

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)

URL: #236
Update outdated CHANGELOG.md and README.md files.

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - Gregory Lee (https://github.com/grlee77)
  - https://github.com/jakirkham

URL: #226
Do not reference nullptr in CuFileDriver::close() method.

```
pip install --extra-index-url https://test.pypi.org/simple/ cucim==0.0.229
```

Fixes #228

Signed-off-by: Gigon Bae <gbae@nvidia.com>

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - Benjamin Zaitlen (https://github.com/quasiben)
  - https://github.com/jakirkham

URL: #229
I recently committed a config file to be used by the [rapidsai/ops-bot](https://github.com/rapidsai/ops-bot/) and in hindsight, I should've had the new `external_contributors` functionality set to `false` until we're ready to roll it out everywhere. This PR fixes that.

Authors:
   - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
- Close the file descriptor if the file descriptor is owned by the object.
- Update GDS example in the Jupyter notebook.

```python
from cucim.clara.filesystem import CuFileDriver
import cucim.clara.filesystem as fs
import os, cupy as cp, torch

# Create a CuPy array with size 10 (in bytes)
cp_arr = cp.ones(10, dtype=cp.uint8)
# Create a PyTorch array with size 10 (in bytes)
cuda0 = torch.device('cuda:0')
torch_arr = torch.ones(10, dtype=torch.uint8, device=cuda0)

# Using CuFileDriver
# (Opening a file with O_DIRECT flag is required for GDS)
fno = os.open("input.raw", os.O_RDONLY | os.O_DIRECT)
with CuFileDriver(fno) as fd:
  # Read 8 bytes starting from file offset 0 into buffer offset 2
  read_count = fd.pread(cp_arr, 8, 0, 2)
  # Read 10 bytes starting from file offset 3
  read_count = fd.pread(torch_arr, 10, 3)
os.close(fno)

# Another way of opening file with cuFile
with fs.open("output.raw", "w") as fd:
  # Write 10 bytes from cp_array to file starting from offset 5
  write_count = fd.pwrite(cp_arr, 10, 5)
  #############################################
  # <=== file descriptor created by fs.open() would be closed when exiting the scope
  #############################################
```


Fixes #233

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - https://github.com/jakirkham

URL: #234
)

Closes #199

Corresponds to:
scikit-image/scikit-image#6207
scikit-image/scikit-image#6211
scikit-image/scikit-image#6214

Additionally, the affines contained within the `PiecewiseAffineTransform` will have parameters in CuPy arrays when the inputs to `estimate` are CuPy arrays. This is one to make it consistent with the other transform classes.

@chrisroat, can you confirm if this fixes the issue for you?

Authors:
  - Gregory Lee (https://github.com/grlee77)

Approvers:
  - https://github.com/jakirkham

URL: #208
Signed-off-by: Gigon Bae <gbae@nvidia.com>

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - https://github.com/jakirkham

URL: #249
Fix a wrong value assignment for the loaded region image.

Fixes #247

Signed-off-by: Gigon Bae <gbae@nvidia.com>

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - https://github.com/jakirkham

URL: #248
closes #251 by avoiding imports from private CuPy code

The new files here are just subsets of files present in CuPy that are not part of its public API. Only a few functions use functionality from this `_vendored` folder.

The whole folder is mainly here in order to have a version of `cupyx.scipy.signal.fftconvolve` with a modified `choose_conv_mode`. We should eventually just update the convolution selection code in CuPy so that we can remove these files.

I think `fftconvolve` itself was not present at all in CuPy 9.x, but even in the current development branch, the [convolution choice function is still restricted to 1D](https://github.com/cupy/cupy/blob/ec6d2c9a98440b19a133868576fb299972c21f6c/cupy/_math/misc.py#L23-L25)

Authors:
  - Gregory Lee (https://github.com/grlee77)

Approvers:
  - https://github.com/jakirkham

URL: #252
)

- Expose typestr property on CuImage object
- Expose DLDataType and DLDataTypeCode under cucim.clara

Without this patch,
DLDataType and DLDataTypecode can be accessible with the below workaround.

```python
>>> from cucim import CuImage
>>> a = CuImage("notebooks/input/image.tif")
>>> b = a.read_region((0,0), (10,10))
>>> import numpy as np
>>> np.dtype(b.__array_interface__["typestr"]) # b would expose `__cuda_array_interface__` if memory is in GPU.
dtype('uint8')
```

With this patch, we can convert data type to NumPy's dtype easily, and also can access cuCIM's DLDataType.

```python
>>> from cucim import CuImage
>>> a = CuImage("notebooks/input/image.tif")
>>> b = a.read_region((0,0), (10,10))
>>> import numpy as np
>>> b.typestr
'|u1'
>>> np.dtype(b.typestr) == np.uint8
True
>>> from cucim.clara import DLDataType, DLDataTypeCode
>>> b.dtype == DLDataType(DLDataTypeCode.DLUInt, 8, 1)
True
```

Fixes #243

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - https://github.com/jakirkham

URL: #246
As per #225

Randomness updated to be applied to per image in the batch. Existing functionality of applying randomness on entire batch at once is unchanged.

Authors:
  - https://github.com/shekhardw

Approvers:
  - Gigon Bae (https://github.com/gigony)
  - https://github.com/jakirkham

URL: #231
@raydouglass raydouglass requested review from a team as code owners March 31, 2022 20:02
@raydouglass raydouglass merged commit 4284f7b into main Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants