Skip to content

1827 Fix CUDA affine issue and thread-safe issue in AffineGrid#1836

Merged
wyli merged 16 commits intoProject-MONAI:masterfrom
Nic-Ma:1827-fix-cuda-numpy
Mar 25, 2021
Merged

1827 Fix CUDA affine issue and thread-safe issue in AffineGrid#1836
wyli merged 16 commits intoProject-MONAI:masterfrom
Nic-Ma:1827-fix-cuda-numpy

Conversation

@Nic-Ma
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma commented Mar 24, 2021

Fixes #1827 .

Description

This PR fixed the issue in AffineGrid that the affine matrix may be a CUDA tensor and we should not edit self.affine to avoid thread-safe issue.

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.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

/black

@rijobro rijobro mentioned this pull request Mar 24, 2021
2 tasks
@Nic-Ma Nic-Ma force-pushed the 1827-fix-cuda-numpy branch from 7bc2b9b to 6b1dd86 Compare March 24, 2021 09:58
@Nic-Ma Nic-Ma changed the title [WIF] 1827 Fix CUDA affine issue and thread-safe issue in AffineGrid 1827 Fix CUDA affine issue and thread-safe issue in AffineGrid Mar 24, 2021
@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli March 24, 2021 09:59
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

/black

@Nic-Ma Nic-Ma force-pushed the 1827-fix-cuda-numpy branch from 7b1ec4e to c165e71 Compare March 24, 2021 14:38
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

Hi @wyli and @rijobro ,

I have updated this PR according to your comments.
Could you please help review it again?

Thanks.

@Nic-Ma Nic-Ma force-pushed the 1827-fix-cuda-numpy branch from 110eaf4 to 1066f4e Compare March 24, 2021 16:54
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

/integration-test

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 24, 2021

/integration-test

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 25, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Mar 25, 2021

Hi @wyli and @rijobro ,

Thanks for your review, I updated the PR based on the discussion.
Could you please help review it again?

Thanks.

@wyli wyli enabled auto-merge (squash) March 25, 2021 14:31
Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

thanks, we dropped d029fc3 this commit for cachedataset thread safe update. we'll get back to this after 0.5

@wyli wyli merged commit c5be1ad into Project-MONAI:master Mar 25, 2021
@Nic-Ma Nic-Ma deleted the 1827-fix-cuda-numpy branch July 2, 2021 23:38
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.

AffineGrid GPU tensor error

4 participants