Skip to content

Fix 2132 - CuPy <> NumPy conversion#2133

Merged
bhashemian merged 9 commits intoProject-MONAI:devfrom
bhashemian:tocupy
May 4, 2021
Merged

Fix 2132 - CuPy <> NumPy conversion#2133
bhashemian merged 9 commits intoProject-MONAI:devfrom
bhashemian:tocupy

Conversation

@bhashemian
Copy link
Copy Markdown
Member

Fixes #2132

Description

This PR add ToCupy and ToCupyd for converting list or tuple of numbers, numpy array, and torch tensors to cupy. It also modifies ToNumpy to handle cupy arrays as input.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@bhashemian bhashemian enabled auto-merge (squash) May 4, 2021 15:40
@bhashemian bhashemian merged commit 9536821 into Project-MONAI:dev May 4, 2021
yanielc pushed a commit to yanielc/MONAI that referenced this pull request May 10, 2021
* Implement ToCupy

Signed-off-by: Behrooz <[email protected]>

* Add unittests for ToCupy and ToCupyd

Signed-off-by: Behrooz <[email protected]>

* Add docs

Signed-off-by: Behrooz <[email protected]>

* Reformat

Signed-off-by: Behrooz <[email protected]>

* Add CuPy to NumPy

Signed-off-by: Behrooz <[email protected]>

* Add unittests for ToNumpy and ToNumpyd for CuPy input

Signed-off-by: Behrooz <[email protected]>

* Add has_cp

Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Yaniel Cabrera <[email protected]>
yanielc pushed a commit to yanielc/MONAI that referenced this pull request May 13, 2021
* Implement ToCupy

Signed-off-by: Behrooz <[email protected]>

* Add unittests for ToCupy and ToCupyd

Signed-off-by: Behrooz <[email protected]>

* Add docs

Signed-off-by: Behrooz <[email protected]>

* Reformat

Signed-off-by: Behrooz <[email protected]>

* Add CuPy to NumPy

Signed-off-by: Behrooz <[email protected]>

* Add unittests for ToNumpy and ToNumpyd for CuPy input

Signed-off-by: Behrooz <[email protected]>

* Add has_cp

Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Yaniel Cabrera <[email protected]>
yanielc pushed a commit to yanielc/MONAI that referenced this pull request May 13, 2021
* Implement ToCupy

Signed-off-by: Behrooz <[email protected]>

* Add unittests for ToCupy and ToCupyd

Signed-off-by: Behrooz <[email protected]>

* Add docs

Signed-off-by: Behrooz <[email protected]>

* Reformat

Signed-off-by: Behrooz <[email protected]>

* Add CuPy to NumPy

Signed-off-by: Behrooz <[email protected]>

* Add unittests for ToNumpy and ToNumpyd for CuPy input

Signed-off-by: Behrooz <[email protected]>

* Add has_cp

Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Yaniel Cabrera <[email protected]>
@bhashemian bhashemian deleted the tocupy branch November 23, 2021 23:52
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.

CuPy <> NumPy

2 participants