-
Notifications
You must be signed in to change notification settings - Fork 23.4k
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
[SR] Give VarStackNodeWrapper an iterator #69922
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow For more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit ad66351 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
This pull request was exported from Phabricator. Differential Revision: D33101489 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D33101489 |
eee801a
to
09829db
Compare
This pull request was exported from Phabricator. Differential Revision: D33101489 |
09829db
to
e6b6fd6
Compare
This pull request was exported from Phabricator. Differential Revision: D33101489 |
e6b6fd6
to
fb6c14d
Compare
Summary: Pull Request resolved: pytorch#69922 D32596934 (pytorch@65f54bc) made the serial stack implementation a bit brittle. It introduced a new container type: `VarStackNodeWrapper`. This type was used as a template parameter in the serial stack implementation. The other type used in the serial stack implementation is `at::ArrayRef<at::Tensor>`. Ideally, the interface of `VarStackNodeWrapper` should be as close as possible to this other type. However, because the new container type did not have an iterator, expressions like this would fail to compile: ``` for (const auto& tensor : tensors) { // do something } ``` Introducing this iterator will make the code easier to maintain going forward. Test Plan: `buck test caffe2/benchmarks/static_runtime:static_runtime_cpptest -- Stack` I consider this a `VarStack` implementation detail, so I'd prefer not to test it directly. We can test it implicitly by adding some code to the serial stack implementation that uses the iterator. Reviewed By: swolchok Differential Revision: D33101489 fbshipit-source-id: 20d937e98cea7645c74dc746c5b0e66779517ae1
This pull request was exported from Phabricator. Differential Revision: D33101489 |
fb6c14d
to
ad66351
Compare
Summary:
D32596934 made the serial stack implementation a bit brittle. It introduced a new container type:
VarStackNodeWrapper
. This type was used as a template parameter in the serial stack implementation.The other type used in the serial stack implementation is
at::ArrayRef<at::Tensor>
. Ideally, the interface ofVarStackNodeWrapper
should be as close as possible to this other type. However, because the new container type did not have an iterator, expressions like this would fail to compile:Introducing this iterator will make the code easier to maintain going forward.
Test Plan:
buck test caffe2/benchmarks/static_runtime:static_runtime_cpptest -- Stack
I consider this a
VarStack
implementation detail, so I'd prefer not to test it directly. We can test it implicitly by adding some code to the serial stack implementation that uses the iterator.Differential Revision: D33101489