Skip to content

Conversation

colin2328
Copy link
Contributor

Summary:
update ShardedEmbeddingBagCollection to be composable according to https://docs.google.com/document/d/1TBJSd5zgEg6cRcXv3Okuj7bBkqQwGS2IPh4TLWNNzFI/edit

this works with DMP

named_parameters() behavior changes -> use include_fused as temporary flag to gate this behavior
note that due to ShardedTensor not supporting grads directly, this won't work for Dense compute kernels when non data parallel. This is not used today, and will add a TODO but is low pri

Differential Revision: D40458625

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Oct 28, 2022
@facebook-github-bot
Copy link
Contributor

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

2 similar comments
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

…hardedTensors as registered modules (#88026)

Summary:
X-link: pytorch/pytorch#88026

Pull Request resolved: #758

update ShardedEmbeddingBagCollection to be composable according to https://docs.google.com/document/d/1TBJSd5zgEg6cRcXv3Okuj7bBkqQwGS2IPh4TLWNNzFI/edit

this works with DMP

named_parameters() behavior changes -> use include_fused as temporary flag to gate this behavior
note that due to ShardedTensor not supporting grads directly, this won't work for Dense compute kernels when non data parallel. This is not used today, and will add a TODO but is low pri

Differential Revision: D40458625

fbshipit-source-id: 9135216ac67c828d8532d5c251cd6b8d170c058b
@facebook-github-bot
Copy link
Contributor

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

pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Nov 17, 2022
…e registered EBCs with shardedTensors as registered modules (#758) (#88026)

Summary:
X-link: meta-pytorch/torchrec#758

This PR fixes a bug in FSDP/DDP, where ShardedTensors are not supported even if passed in as params to ignore.
this is important for composability because TorchRec named_parameters() will return FQN of shardedTensors (as defined in goals)
It defines device of ShardedTensor to be None when local_tensor() does not exist on rank

update ShardedEmbeddingBagCollection to be composable according to https://docs.google.com/document/d/1TBJSd5zgEg6cRcXv3Okuj7bBkqQwGS2IPh4TLWNNzFI/edit

Differential Revision: D40458625

Pull Request resolved: #88026
Approved by: https://github.com/wanchaol, https://github.com/rohan-varma
@colin2328 colin2328 closed this by deleting the head repository Dec 6, 2022
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
…e registered EBCs with shardedTensors as registered modules (pytorch#758) (pytorch#88026)

Summary:
X-link: meta-pytorch/torchrec#758

This PR fixes a bug in FSDP/DDP, where ShardedTensors are not supported even if passed in as params to ignore.
this is important for composability because TorchRec named_parameters() will return FQN of shardedTensors (as defined in goals)
It defines device of ShardedTensor to be None when local_tensor() does not exist on rank

update ShardedEmbeddingBagCollection to be composable according to https://docs.google.com/document/d/1TBJSd5zgEg6cRcXv3Okuj7bBkqQwGS2IPh4TLWNNzFI/edit

Differential Revision: D40458625

Pull Request resolved: pytorch#88026
Approved by: https://github.com/wanchaol, https://github.com/rohan-varma
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