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

split cpu parts in permute_pooled_embedding_ops for cpu_only #987

Closed

Conversation

RabbitWhite1
Copy link
Contributor

@RabbitWhite1 RabbitWhite1 commented Mar 17, 2022

As specified in CMakeLists.txt, "src/permute_pooled_embedding_ops_gpu.cpp" will only compile when "NOT FBGEMM_CPU_ONLY", which means the method "permute_pooled_embs_auto_grad" won't be generated when --cpu_only. However, this method is used by torchrec's column_wise sharding.

The pr mentioned in #950 cannot work because of not using m.def to define permute_pooled_embs_auto_grad.

@facebook-github-bot
Copy link
Contributor

Hi @RabbitWhite1!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot
Copy link
Contributor

@jianyuh has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jianyuh
Copy link
Member

jianyuh commented Mar 18, 2022

cc @geyyer : please take a look at this PR.

@RabbitWhite1
Copy link
Contributor Author

Fixed duplicated m.def in permute_pooled_embedding_ops_gpu.cpp

@geyyer
Copy link
Contributor

geyyer commented Mar 18, 2022

@RabbitWhite1, thanks for contributing and noticing the possible issue with cpu-only build! To avoid compatibility issue we have to create an empty file permute_pooled_embs_function.h and then move the class template PermutePooledEmbsFunction there. The PR looks good, could you move permute_pooled_embedding_ops_utils.h contents to permute_pooled_embs_function.h and fix dependencies?

@RabbitWhite1
Copy link
Contributor Author

@RabbitWhite1, thanks for contributing and noticing the possible issue with cpu-only build! To avoid compatibility issue we have to create an empty file permute_pooled_embs_function.h and then move the class template PermutePooledEmbsFunction there. The PR looks good, could you move permute_pooled_embedding_ops_utils.h contents to permute_pooled_embs_function.h and fix dependencies?

Great! I've moved and committed.

@facebook-github-bot
Copy link
Contributor

@jianyuh has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@geyyer has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@geyyer has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

geyyer pushed a commit to geyyer/FBGEMM that referenced this pull request Mar 30, 2022
Summary: Catching up with pytorch#987

Differential Revision: D35261607

fbshipit-source-id: c806f035bfcb4f8872d083431dc7819f6532b7d8
facebook-github-bot pushed a commit that referenced this pull request Mar 31, 2022
Summary:
Pull Request resolved: #1021

Catching up with #987

Reviewed By: jianyuh

Differential Revision: D35261607

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

This pull request has been reverted by 386a473.

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.

None yet

4 participants