-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
support GPU tensor for GridPatch
and GridPatchDataset
#6246
support GPU tensor for GridPatch
and GridPatchDataset
#6246
Conversation
* `GridPatch`, `GridPatchd`, `RandGridPatch` and `RandGridPatchd` * `GridPatchDataset`, `PatchIter`, `PatchIterd` and `iter_patch`
for more information, see https://pre-commit.ci
/black |
Signed-off-by: monai-bot <[email protected]>
By checking the tests in CI, it seems |
thanks, let me skip the tests for this new feature for torch<1.11... |
Signed-off-by: Wenqi Li <[email protected]>
there are still some typing issues, I think you can debug with |
DCO Remediation Commit for Qingpeng Li <[email protected]> I, Qingpeng Li <[email protected]>, hereby add my Signed-off-by to this commit: 4d178e2 Signed-off-by: Qingpeng Li <[email protected]>
for more information, see https://pre-commit.ci
/black |
Signed-off-by: monai-bot <[email protected]>
Signed-off-by: Qingpeng Li <[email protected]>
/build |
1 similar comment
/build |
Signed-off-by: Wenqi Li <[email protected]>
/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #6245 .
Description
support GPU tensor for
GridPatch
,GridPatchd
,RandGridPatch
andRandGridPatchd
GridPatchDataset
,PatchIter
,PatchIterd
anditer_patch
Changes
GridPatch
,GridPatchDataset
and their siblings need to copy GPU tensor to numpy array (or not support GPU tensor) in their pipeline. This PR enables them to support end-to-end GPU operations.pad_nd
is used heavily, its robustness is improved. Some strange behavior introduced byPad
uses numpy though pytorch backend is available #6066 is fixed.GridPatch
,GridPatch
withpin_memory=True
significant slow-down in following epochs #6082 might be fixed by this PR?RandGridPatch
's mode defaults toNone
(consistent with docs)Need to Notice
PatchIter
,PatchIterd
anditer_patch
are kept asNumpyPadMode.WRAP
. However,GridPatch
defaults toNone
. (might be inconsistent?)Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.