-
Notifications
You must be signed in to change notification settings - Fork 583
Add ability in SSDTBE to fetch weights from L1 and SP from outside of the module #3166
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
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
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D72188513 |
chouxi
added a commit
to chouxi/torchrec
that referenced
this pull request
Jul 8, 2025
… the module (meta-pytorch#3166) Summary: X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/torchrec
that referenced
this pull request
Jul 8, 2025
… the module (meta-pytorch#3166) Summary: X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 Pull Request resolved: pytorch#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D72188513 |
chouxi
added a commit
to chouxi/torchrec
that referenced
this pull request
Jul 8, 2025
… the module (meta-pytorch#3166) Summary: Pull Request resolved: meta-pytorch#3166 X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 Pull Request resolved: pytorch#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D72188513 |
chouxi
added a commit
to chouxi/torchrec
that referenced
this pull request
Jul 8, 2025
… the module (meta-pytorch#3166) Summary: Pull Request resolved: meta-pytorch#3166 X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/torchrec
that referenced
this pull request
Jul 8, 2025
… the module (meta-pytorch#3166) Summary: X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/torchrec
that referenced
this pull request
Jul 8, 2025
… the module (meta-pytorch#3166) Summary: X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 Pull Request resolved: pytorch#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D72188513 |
chouxi
added a commit
to chouxi/torchrec
that referenced
this pull request
Jul 8, 2025
… the module (meta-pytorch#3166) Summary: Pull Request resolved: meta-pytorch#3166 X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
chouxi
added a commit
to chouxi/FBGEMM
that referenced
this pull request
Jul 8, 2025
… the module (pytorch#4450) Summary: X-link: meta-pytorch/torchrec#3166 Pull Request resolved: pytorch#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
… the module (meta-pytorch#3166) Summary: Pull Request resolved: meta-pytorch#3166 X-link: pytorch/FBGEMM#4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D72188513 |
facebook-github-bot
pushed a commit
to pytorch/FBGEMM
that referenced
this pull request
Jul 9, 2025
… the module (#4450) Summary: X-link: meta-pytorch/torchrec#3166 Pull Request resolved: #4450 X-link: facebookresearch/FBGEMM#1513 Given row ids, fetch the updated weighs from L1 and SP. `register_backward_hook_before_eviction` This function will be called in delta tracker - register the hook to be executed in backward before the sp eviction. - So the hooks are reordered to let the hook registered through this function to execute first. `fetch_from_l1_sp_w_row_ids` will be called inside the backward hook registered using above function - to get updated weights for the given row ids already added offset to SSDTBE tables. - fetch from `lxu_cache_weights (L1)` and rest from `inserted_rows (SP) ` `table_names` is added to let the delta tracker aware of the table to TBE map. - the delta tracker stores the updated ids in forward pass's lookup module, it stores ids as a 'fqn' -> 'ids' map. - in backward pass, per TBE module we need to know which ids we want to fetch for the updated weights, thus the table names is needed to infer fqn. Reviewed By: q10, duduyi2013 Differential Revision: D72188513 fbshipit-source-id: e35b86695877088829d359b5601561fcc51d2dcd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
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.
Summary:
X-link: pytorch/FBGEMM#4450
X-link: https://github.com/facebookresearch/FBGEMM/pull/1513
Given row ids, fetch the updated weighs from L1 and SP.
register_backward_hook_before_evictionThis function will be called in delta trackerfetch_from_l1_sp_w_row_idswill be called inside the backward hook registered using above functionlxu_cache_weights (L1)and rest frominserted_rows (SP)table_namesis added to let the delta tracker aware of the table to TBE map.Reviewed By: q10
Differential Revision: D72188513