Skip to content

Conversation

@chouxi
Copy link
Contributor

@chouxi chouxi commented Jul 7, 2025

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_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

Differential Revision: D72188513

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 7, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72188513

@chouxi chouxi force-pushed the export-D72188513 branch from b7002ee to 9c5f960 Compare July 8, 2025 17:54
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 chouxi force-pushed the export-D72188513 branch from 9c5f960 to 2077c59 Compare July 8, 2025 17:55
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
@facebook-github-bot
Copy link
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 chouxi force-pushed the export-D72188513 branch from 2077c59 to b6307da Compare July 8, 2025 18:02
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
@facebook-github-bot
Copy link
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 chouxi force-pushed the export-D72188513 branch from b6307da to 01784db Compare July 8, 2025 18:17
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 chouxi force-pushed the export-D72188513 branch from 01784db to 43752d0 Compare July 8, 2025 19:24
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 chouxi force-pushed the export-D72188513 branch from 43752d0 to 08311a6 Compare July 8, 2025 19:25
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
@facebook-github-bot
Copy link
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 chouxi force-pushed the export-D72188513 branch from 08311a6 to 28bd9bd Compare July 8, 2025 19:33
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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72188513

@chouxi chouxi force-pushed the export-D72188513 branch from 28bd9bd to b2ea7bf Compare July 8, 2025 19:40
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants