-
Notifications
You must be signed in to change notification settings - Fork 22.1k
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
[Static Runtime] Fix aten::clone out variant (#78297) #78322
[Static Runtime] Fix aten::clone out variant (#78297) #78322
Conversation
🔗 Helpful links
❌ 1 New Failures, 1 Base FailuresAs of commit a48534b (more details on the Dr. CI page): Expand to see more
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakagespull / linux-xenial-py3.7-clang7-onnx / test (default, 1, 2, linux.2xlarge) (1/1)Step: "Test" (full log | diagnosis details | 🔁 rerun)
|
This pull request was exported from Phabricator. Differential Revision: D36672180 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D36672180 |
2a45218
to
43f5aa8
Compare
This pull request was exported from Phabricator. Differential Revision: D36672180 |
43f5aa8
to
a1e8614
Compare
This pull request was exported from Phabricator. Differential Revision: D36672180 |
a1e8614
to
5db5f92
Compare
This pull request was exported from Phabricator. Differential Revision: D36672180 |
5db5f92
to
36846bc
Compare
36846bc
to
e407eb2
Compare
This pull request was exported from Phabricator. Differential Revision: D36672180 |
Summary: Pull Request resolved: pytorch#78322 Disable the out variant for tensors with stride 0 and non-preserve memoryFormats. - Calls native clone instead of out variant for clone dealing with expanded tensors - Added test case for both clone variants (out and native clones). - Increased the tensor size for memory planner test case to trigger dynamic allocation Test Plan: buck test caffe2/benchmarks/static_runtime/fb:test_fb_operators buck test caffe2/benchmarks/static_runtime:static_runtime_cpptest Reviewed By: mikeiovine, tenpercent Differential Revision: D36672180 fbshipit-source-id: 48eb9533867d91ab3dc1b03be5750885818c33e5
This pull request was exported from Phabricator. Differential Revision: D36672180 |
e407eb2
to
a48534b
Compare
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Summary: Pull Request resolved: #78322 Disable the out variant for tensors with stride 0 and non-preserve memoryFormats. - Calls native clone instead of out variant for clone dealing with expanded tensors - Added test case for both clone variants (out and native clones). - Increased the tensor size for memory planner test case to trigger dynamic allocation Test Plan: buck test caffe2/benchmarks/static_runtime/fb:test_fb_operators buck test caffe2/benchmarks/static_runtime:static_runtime_cpptest Reviewed By: mikeiovine, tenpercent Differential Revision: D36672180 fbshipit-source-id: 64263ad3d3950d95a39e2213345aa9f20746779f
Summary:
Pull Request resolved: #78297
Clone followed by expand/expand_as due to memoryOverlap check on copy_ native method. Refer to T118519310 for more details.
Crashing test case:
a = tensor(3,1) // strides = (1,1)
B = tensor(3,2) // strides = (2,1)
Temp = a.expand_as(b). // creates temp with shape as (3,2) and strides as (1,0)
temp.clone() // crashe on copy_ due to memoryOverlap
Fix: Disable the out variant for the expanded tensor.
Test Plan:
buck test caffe2/benchmarks/static_runtime/fb:test_fb_operators
buck test caffe2/benchmarks/static_runtime:static_runtime_cpptest
Differential Revision: D36672180