This repository was archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Added use_activation_hooks: bool
to swap
#214
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ghstack-poisoned]
awgu
commented
Feb 14, 2024
@@ -70,8 +70,10 @@ def _update_history_with_new_amax(new_amax, amax_history): | |||
def swap_linear_with_float8_linear( | |||
module: nn.Module, | |||
module_cls: Type[nn.Module], | |||
emulate: bool = False, | |||
*, |
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.
I was thinking that forcing these to be kwarg only would be less error prone.
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.
yeah I like it!
@awgu has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This was referenced Feb 14, 2024
This PR exposes `use_activation_hooks` to `swap_linear_with_float8_linear`. I am not sure if we want this long-term. Are we going to consolidate to _always_ using activation hooks in the future (because we need it for DTensor (?))? **Test Plan** ``` ./test/test_everything.sh ``` Differential Revision: [D53780333](https://our.internmc.facebook.com/intern/diff/D53780333) [ghstack-poisoned]
This PR exposes `use_activation_hooks` to `swap_linear_with_float8_linear`. I am not sure if we want this long-term. Are we going to consolidate to _always_ using activation hooks in the future (because we need it for DTensor (?))? **Test Plan** ``` ./test/test_everything.sh ``` Differential Revision: [D53780333](https://our.internmc.facebook.com/intern/diff/D53780333) [ghstack-poisoned]
This was referenced Feb 16, 2024
This PR exposes `use_activation_hooks` to `swap_linear_with_float8_linear`. I am not sure if we want this long-term. Are we going to consolidate to _always_ using activation hooks in the future (because we need it for DTensor (?))? **Test Plan** ``` ./test/test_everything.sh ``` Differential Revision: [D53780333](https://our.internmc.facebook.com/intern/diff/D53780333) [ghstack-poisoned]
This PR exposes `use_activation_hooks` to `swap_linear_with_float8_linear`. I am not sure if we want this long-term. Are we going to consolidate to _always_ using activation hooks in the future (because we need it for DTensor (?))? **Test Plan** ``` ./test/test_everything.sh ``` Differential Revision: [D53780333](https://our.internmc.facebook.com/intern/diff/D53780333) [ghstack-poisoned]
This PR exposes `use_activation_hooks` to `swap_linear_with_float8_linear`. I am not sure if we want this long-term. Are we going to consolidate to _always_ using activation hooks in the future (because we need it for DTensor (?))? **Test Plan** ``` ./test/test_everything.sh ``` Differential Revision: [D53780333](https://our.internmc.facebook.com/intern/diff/D53780333) [ghstack-poisoned]
drisspg
approved these changes
Feb 16, 2024
This PR exposes `use_activation_hooks` to `swap_linear_with_float8_linear`. I am not sure if we want this long-term. Are we going to consolidate to _always_ using activation hooks in the future (because we need it for DTensor (?))? **Test Plan** ``` ./test/test_everything.sh ``` Differential Revision: [D53780333](https://our.internmc.facebook.com/intern/diff/D53780333) [ghstack-poisoned]
@drisspg I am seeing:
from |
@awgu has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
use_activation_hooks: bool
to swap #214This PR exposes
use_activation_hooks
toswap_linear_with_float8_linear
. I am not sure if we want this long-term. Are we going to consolidate to always using activation hooks in the future (because we need it for DTensor (?))?Test Plan
Differential Revision: D53780333