-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Enable on_before_batch_transfer
for DPStrategy
and IPUAccelerator
#14023
Conversation
on_before_batch_transfer
hook out of _apply_batch_transfer_handler
and enable it for DPStrategy and IPUAcceleratoron_before_batch_transfer
for DPStrategy
and IPUAccelerator
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.
Accept to unblock, but I disagree with it the same way I disagreed when the on_before and on_after hooks were originally introduced.
on_before_batch_transfer
has no meaning when the transfer is handled internally by the accelerator.
we can probably remove them if you have better recommendations here on how users can perform batch transformations on/off device? |
Co-authored-by: Adrian Wälchli <[email protected]>
…r` (#14023) Co-authored-by: Adrian Wälchli <[email protected]>
What does this PR do?
Call to
on_before_batch_transfer
shouldn't be limited to whether any strategy/accelerator supports explicit transfer to batches to the device. Users should still be able to use this for batch transforms, etc...Does your PR introduce any breaking changes? If yes, please list them.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃
cc @Borda @carmocca @awaelchli @ninginthecloud @rohitgr7 @akihironitta