Skip to content
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

NBit forward TBE: remap indices before prefetching; and some more unit tests. #1433

Closed
wants to merge 1 commit into from

Conversation

doehyun
Copy link
Contributor

@doehyun doehyun commented Oct 28, 2022

Summary:
It's reported that UVM_CACHING doesn't work with pruning.
D40788589 (bcc69ed) fixed issues in linearize kernel.

It worked with int_nbit_split_embedding_uvm_caching_codegen_lookup_function, because
in that case, index remapping for pruning occurs before calling int_nbit_split_embedding_uvm_caching_codegen_lookup_function.

IntNBitTableBatchedEmbeddingBagsCodegen::forward() runs index remapping after
prefetch, so it didn't work even with the fix in linearize kernel.

This diff changes the order we call index remapping: first, index remapping, and then prefetch.

Added related tests also.

Differential Revision: D40821768

@netlify
Copy link

netlify bot commented Oct 28, 2022

Deploy Preview for pytorch-fbgemm-docs canceled.

Name Link
🔨 Latest commit 095ab3b
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/63a24ff81b791900087c1572

@facebook-github-bot
Copy link
Contributor

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

doehyun added a commit to doehyun/FBGEMM that referenced this pull request Oct 31, 2022
…t tests. (pytorch#1433)

Summary:
Pull Request resolved: pytorch#1433

It's reported that UVM_CACHING doesn't work with pruning.
D40788589 (pytorch@bcc69ed) fixed issues in linearize kernel.

It worked with int_nbit_split_embedding_uvm_caching_codegen_lookup_function, because
in that case, index remapping for pruning occurs before calling  int_nbit_split_embedding_uvm_caching_codegen_lookup_function.

IntNBitTableBatchedEmbeddingBagsCodegen::forward() runs index remapping after
prefetch, so it didn't work even with the fix in linearize kernel.

This diff changes the order we call index remapping: first, index remapping, and then prefetch.

Added related tests also.

Differential Revision: D40821768

fbshipit-source-id: 3ee17e95ee63b3ba112f67824f0b586749e7b8e7
@facebook-github-bot
Copy link
Contributor

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

doehyun added a commit to doehyun/FBGEMM that referenced this pull request Nov 4, 2022
…t tests. (pytorch#1433)

Summary:
Pull Request resolved: pytorch#1433

It's reported that UVM_CACHING doesn't work with pruning.
D40788589 (pytorch@bcc69ed) fixed issues in linearize kernel.

It worked with int_nbit_split_embedding_uvm_caching_codegen_lookup_function, because
in that case, index remapping for pruning occurs before calling  int_nbit_split_embedding_uvm_caching_codegen_lookup_function.

IntNBitTableBatchedEmbeddingBagsCodegen::forward() runs index remapping after
prefetch, so it didn't work even with the fix in linearize kernel.

This diff changes the order we call index remapping: first, index remapping, and then prefetch.

Added related tests also.

Differential Revision: D40821768

fbshipit-source-id: 5dca0948f4714864c2d0bb94a360cfe659e9f8f6
@facebook-github-bot
Copy link
Contributor

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

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

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

doehyun added a commit to doehyun/FBGEMM that referenced this pull request Nov 18, 2022
…t tests. (pytorch#1433)

Summary:
Pull Request resolved: pytorch#1433

It's reported that UVM_CACHING doesn't work with pruning.
D40788589 (pytorch@bcc69ed) fixed issues in linearize kernel.

It worked with int_nbit_split_embedding_uvm_caching_codegen_lookup_function, because
in that case, index remapping for pruning occurs before calling  int_nbit_split_embedding_uvm_caching_codegen_lookup_function.

IntNBitTableBatchedEmbeddingBagsCodegen::forward() runs index remapping after
prefetch, so it didn't work even with the fix in linearize kernel.

This diff changes the order we call index remapping: first, index remapping, and then prefetch.

Added related tests also.

Differential Revision: D40821768

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

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

doehyun added a commit to doehyun/FBGEMM that referenced this pull request Dec 8, 2022
…t tests. (pytorch#1433)

Summary:
Pull Request resolved: pytorch#1433

It's reported that UVM_CACHING doesn't work with pruning.
D40788589 (pytorch@bcc69ed) fixed issues in linearize kernel.

It worked with int_nbit_split_embedding_uvm_caching_codegen_lookup_function, because
in that case, index remapping for pruning occurs before calling  int_nbit_split_embedding_uvm_caching_codegen_lookup_function.

IntNBitTableBatchedEmbeddingBagsCodegen::forward() runs index remapping after
prefetch, so it didn't work even with the fix in linearize kernel.

This diff changes the order we call index remapping: first, index remapping, and then prefetch.

Added related tests also.

Differential Revision: D40821768

fbshipit-source-id: 6dedc13e4fe9c006ee00df833837d224b43a9257
doehyun added a commit to doehyun/FBGEMM that referenced this pull request Dec 8, 2022
…t tests. (pytorch#1433)

Summary:
Pull Request resolved: pytorch#1433

It's reported that UVM_CACHING doesn't work with pruning.
D40788589 (pytorch@bcc69ed) fixed issues in linearize kernel.

It worked with int_nbit_split_embedding_uvm_caching_codegen_lookup_function, because
in that case, index remapping for pruning occurs before calling  int_nbit_split_embedding_uvm_caching_codegen_lookup_function.

IntNBitTableBatchedEmbeddingBagsCodegen::forward() runs index remapping after
prefetch, so it didn't work even with the fix in linearize kernel.

This diff changes the order we call index remapping: first, index remapping, and then prefetch.

Added related tests also.

Differential Revision: D40821768

fbshipit-source-id: 017db632cd2d7891c177cd3959f1d8967538b2ea
@facebook-github-bot
Copy link
Contributor

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

…t tests. (pytorch#1433)

Summary:
Pull Request resolved: pytorch#1433

It's reported that UVM_CACHING doesn't work with pruning.
D40788589 (pytorch@bcc69ed) fixed issues in linearize kernel.

It worked with int_nbit_split_embedding_uvm_caching_codegen_lookup_function, because
in that case, index remapping for pruning occurs before calling  int_nbit_split_embedding_uvm_caching_codegen_lookup_function.

IntNBitTableBatchedEmbeddingBagsCodegen::forward() runs index remapping after
prefetch, so it didn't work even with the fix in linearize kernel.

This diff changes the order we call index remapping: first, index remapping, and then prefetch.

Added related tests also.

Reviewed By: jspark1105

Differential Revision: D40821768

fbshipit-source-id: 03487fe137a76b1d4819aa8c6070bc5c49ac60a8
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 2cb8b0d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants