-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Make all non-input arguments to functionals part of its options, and pass functional options by const-ref when possible #29404
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
Conversation
CircleCI build failures summaryAs of commit 2c9c40c:
Here are the reasons each build failed. This comment was automatically generated by Dr. CI. Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 14 time(s). |
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
pbelevich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Options for the `BatchNorm` module.
struct TORCH_API BatchNormFuncOptions {
Should be functional instead of module
…tions, and pass functional options by const-ref when possible" Make all non-input arguments to functionals part of its options gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
Thanks for the catch! I will fix this in a follow-up doc cleaning PR |
Summary: Pull Request resolved: #29673 Following #29364 and #29404, this PR makes `F::EmbeddingFuncOptions` and `F::EmbeddingBagFuncOptions` separate classes from `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`, so that it's easier to enforce that arguments such as `num_embeddings` and `embedding_dim` are required for `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`. Test Plan: Imported from OSS Differential Revision: D18462540 Pulled By: yf225 fbshipit-source-id: f2abf431e48675b0a9d7f6f398cdb90ff9037c35
…9673) Summary: Pull Request resolved: pytorch#29673 Following pytorch#29364 and pytorch#29404, this PR makes `F::EmbeddingFuncOptions` and `F::EmbeddingBagFuncOptions` separate classes from `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`, so that it's easier to enforce that arguments such as `num_embeddings` and `embedding_dim` are required for `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`. Test Plan: Imported from OSS Differential Revision: D18462540 Pulled By: yf225 fbshipit-source-id: f2abf431e48675b0a9d7f6f398cdb90ff9037c35
Stack from ghstack:
This PR makes all non-input arguments to functionals part of its options parameters, so that we won't break backward compatibility even if we add or reorder some of the non-input arguments to functionals in the future.
Differential Revision: D18378526