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

CuPy to Tensor #2919

Merged
merged 2 commits into from
Sep 10, 2021
Merged

CuPy to Tensor #2919

merged 2 commits into from
Sep 10, 2021

Conversation

bhashemian
Copy link
Member

Description

I realized that due to some changes since v0.5, ToTensor is not able to convert from cupy.ndarray to torch.Tensor . This PR brings back CuPy to Tensor functionality.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • New tests added to cover the changes.

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian
Copy link
Member Author

@Nic-Ma can you take a look at this? It's a simple change to bring back cupy > tensor conversion.

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Sep 10, 2021

/black

Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
@wyli Do you have any other comments?

Thanks.

@wyli wyli merged commit ef09811 into Project-MONAI:dev Sep 10, 2021
@bhashemian bhashemian deleted the cupy-to-tensor branch November 23, 2021 23:52
@bhashemian bhashemian restored the cupy-to-tensor branch November 23, 2021 23:53
@bhashemian bhashemian deleted the cupy-to-tensor branch November 23, 2021 23:57
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.

3 participants