Skip to content

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Aug 16, 2022

Stack from ghstack (oldest at bottom):

This PR is to flush out test failures. We will then remove the
logic in subsequent PRs.

Signed-off-by: Edward Z. Yang ezyang@fb.com

This PR is to flush out test failures.  We will then remove the
logic in subsequent PRs.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Aug 16, 2022
This PR is to flush out test failures.  We will then remove the
logic in subsequent PRs.

Signed-off-by: Edward Z. Yang <ezyangfb.com>

ghstack-source-id: d9f37c7
Pull Request resolved: #83545
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 16, 2022

🔗 Helpful links

❌ 6 New Failures

As of commit 0d42912 (more details on the Dr. CI page):

Expand to see more
  • 6/6 failures introduced in this PR

🕵️ 6 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages

See GitHub Actions build pull / linux-focal-py3.7-gcc7 / test (default, 2, 2, linux.2xlarge) (1/6)

Step: "Test" (full log | diagnosis details)

2022-08-17T05:26:22.0062112Z FAIL [0.001s]: tes...a_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T05:26:22.0008146Z     registered at /var/lib/jenkins/workspace/build/aten/src/ATen/RegisterSchema.cpp:6
2022-08-17T05:26:22.0008405Z   dispatch key: ZeroTensor
2022-08-17T05:26:22.0008780Z   previous kernel: registered at /var/lib/jenkins/workspace/aten/src/ATen/BatchingRegistrations.cpp:1089
2022-08-17T05:26:22.0009373Z        new kernel: registered at /dev/null:628 (Triggered internally at /var/lib/jenkins/workspace/aten/src/ATen/core/dispatch/OperatorEntry.cpp:139.)
2022-08-17T05:26:22.0009836Z   self.m.impl(name, dispatch_key, fn)
2022-08-17T05:26:22.0010026Z ok (0.004s)
2022-08-17T05:26:22.0024423Z   test_override_cpu_sum (__main__.TestPythonRegistration) ... ok (0.001s)
2022-08-17T05:26:22.0061175Z   test_override_cuda_with_jiterator (__main__.TestPythonRegistration) ... ok (0.004s)
2022-08-17T05:26:22.0061619Z 
2022-08-17T05:26:22.0061775Z ======================================================================
2022-08-17T05:26:22.0062112Z FAIL [0.001s]: test_metadata_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T05:26:22.0062548Z ----------------------------------------------------------------------
2022-08-17T05:26:22.0062807Z Traceback (most recent call last):
2022-08-17T05:26:22.0063066Z   File "test_python_dispatch.py", line 451, in test_metadata_change_not_allowed
2022-08-17T05:26:22.0063366Z     self.assertRaises(RuntimeError, lambda: y.resize_(4))
2022-08-17T05:26:22.0063803Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 2450, in assertRaises
2022-08-17T05:26:22.0064143Z     return super().assertRaises(expected_exception, *args, **kwargs)
2022-08-17T05:26:22.0064408Z AssertionError: RuntimeError not raised by <lambda>
2022-08-17T05:26:22.0064558Z 
2022-08-17T05:26:22.0064762Z ----------------------------------------------------------------------
2022-08-17T05:26:22.0065001Z Ran 85 tests in 0.419s

See GitHub Actions build pull / linux-focal-py3.7-clang7-asan / test (default, 3, 5, linux.2xlarge) (2/6)

Step: "Test" (full log | diagnosis details)

2022-08-17T06:16:50.6202783Z FAIL [0.002s]: tes...a_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T06:16:50.6113315Z     registered at /var/lib/jenkins/workspace/build/aten/src/ATen/RegisterSchema.cpp:6
2022-08-17T06:16:50.6113570Z   dispatch key: ZeroTensor
2022-08-17T06:16:50.6113892Z   previous kernel: registered at /var/lib/jenkins/workspace/aten/src/ATen/BatchingRegistrations.cpp:1089
2022-08-17T06:16:50.6114590Z        new kernel: registered at /dev/null:628 (Triggered internally at /var/lib/jenkins/workspace/aten/src/ATen/core/dispatch/OperatorEntry.cpp:139.)
2022-08-17T06:16:50.6114910Z   self.m.impl(name, dispatch_key, fn)
2022-08-17T06:16:50.6120602Z ok (0.008s)
2022-08-17T06:16:50.6145964Z   test_override_cpu_sum (__main__.TestPythonRegistration) ... ok (0.002s)
2022-08-17T06:16:50.6198692Z   test_override_cuda_with_jiterator (__main__.TestPythonRegistration) ... ok (0.005s)
2022-08-17T06:16:50.6199191Z 
2022-08-17T06:16:50.6199319Z ======================================================================
2022-08-17T06:16:50.6202783Z FAIL [0.002s]: test_metadata_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T06:16:50.6203238Z ----------------------------------------------------------------------
2022-08-17T06:16:50.6203502Z Traceback (most recent call last):
2022-08-17T06:16:50.6203771Z   File "test_python_dispatch.py", line 451, in test_metadata_change_not_allowed
2022-08-17T06:16:50.6204075Z     self.assertRaises(RuntimeError, lambda: y.resize_(4))
2022-08-17T06:16:50.6204513Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 2450, in assertRaises
2022-08-17T06:16:50.6204845Z     return super().assertRaises(expected_exception, *args, **kwargs)
2022-08-17T06:16:50.6205123Z AssertionError: RuntimeError not raised by <lambda>
2022-08-17T06:16:50.6205273Z 
2022-08-17T06:16:50.6205472Z ----------------------------------------------------------------------
2022-08-17T06:16:50.6205712Z Ran 85 tests in 0.686s

See GitHub Actions build pull / linux-bionic-cuda11.6-py3.10-gcc7 / test (default, 2, 4, linux.4xlarge.nvidia.gpu) (3/6)

Step: "Test" (full log | diagnosis details)

2022-08-17T06:21:43.6555662Z FAIL [0.001s]: tes...a_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T06:21:42.3154105Z /opt/conda/lib/python3.10/site-packages/torch/library.py:126: UserWarning: Overriding a previously registered kernel for the same operator and the same dispatch key
2022-08-17T06:21:42.3155018Z   operator: aten::add.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor
2022-08-17T06:21:42.3155502Z     registered at /var/lib/jenkins/workspace/build/aten/src/ATen/RegisterSchema.cpp:6
2022-08-17T06:21:42.3155866Z   dispatch key: CUDA
2022-08-17T06:21:42.3156260Z   previous kernel: registered at /var/lib/jenkins/workspace/aten/src/ATen/BatchingRegistrations.cpp:1089
2022-08-17T06:21:42.3156847Z        new kernel: registered at /dev/null:212 (Triggered internally at /var/lib/jenkins/workspace/aten/src/ATen/core/dispatch/OperatorEntry.cpp:139.)
2022-08-17T06:21:42.3157305Z   self.m.impl(name, dispatch_key, fn)
2022-08-17T06:21:43.6554884Z ok (2.130s)
2022-08-17T06:21:43.6555104Z 
2022-08-17T06:21:43.6555275Z ======================================================================
2022-08-17T06:21:43.6555662Z FAIL [0.001s]: test_metadata_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T06:21:43.6556487Z ----------------------------------------------------------------------
2022-08-17T06:21:43.6556818Z Traceback (most recent call last):
2022-08-17T06:21:43.6557243Z   File "/var/lib/jenkins/workspace/test/test_python_dispatch.py", line 451, in test_metadata_change_not_allowed
2022-08-17T06:21:43.6557677Z     self.assertRaises(RuntimeError, lambda: y.resize_(4))
2022-08-17T06:21:43.6558285Z   File "/opt/conda/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 2450, in assertRaises
2022-08-17T06:21:43.6558755Z     return super().assertRaises(expected_exception, *args, **kwargs)
2022-08-17T06:21:43.6559139Z AssertionError: RuntimeError not raised by <lambda>
2022-08-17T06:21:43.6559337Z 
2022-08-17T06:21:43.6559611Z ----------------------------------------------------------------------
2022-08-17T06:21:43.6559942Z Ran 85 tests in 3.868s

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (default, 1, 2, linux.2xlarge) (4/6)

Step: "Test" (full log | diagnosis details)

2022-08-17T05:34:11.8990982Z FAIL [0.001s]: tes...a_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T05:34:11.8936520Z     registered at /var/lib/jenkins/workspace/build/aten/src/ATen/RegisterSchema.cpp:6
2022-08-17T05:34:11.8936777Z   dispatch key: ZeroTensor
2022-08-17T05:34:11.8937086Z   previous kernel: registered at /var/lib/jenkins/workspace/aten/src/ATen/BatchingRegistrations.cpp:1089
2022-08-17T05:34:11.8937664Z        new kernel: registered at /dev/null:628 (Triggered internally at /var/lib/jenkins/workspace/aten/src/ATen/core/dispatch/OperatorEntry.cpp:139.)
2022-08-17T05:34:11.8938012Z   self.m.impl(name, dispatch_key, fn)
2022-08-17T05:34:11.8938290Z ok (0.004s)
2022-08-17T05:34:11.8953123Z   test_override_cpu_sum (__main__.TestPythonRegistration) ... ok (0.001s)
2022-08-17T05:34:11.8990036Z   test_override_cuda_with_jiterator (__main__.TestPythonRegistration) ... ok (0.004s)
2022-08-17T05:34:11.8990363Z 
2022-08-17T05:34:11.8990530Z ======================================================================
2022-08-17T05:34:11.8990982Z FAIL [0.001s]: test_metadata_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T05:34:11.8991718Z ----------------------------------------------------------------------
2022-08-17T05:34:11.8992186Z Traceback (most recent call last):
2022-08-17T05:34:11.8992646Z   File "test_python_dispatch.py", line 451, in test_metadata_change_not_allowed
2022-08-17T05:34:11.8993197Z     self.assertRaises(RuntimeError, lambda: y.resize_(4))
2022-08-17T05:34:11.8993871Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 2450, in assertRaises
2022-08-17T05:34:11.8994343Z     return super().assertRaises(expected_exception, *args, **kwargs)
2022-08-17T05:34:11.8994836Z AssertionError: RuntimeError not raised by <lambda>
2022-08-17T05:34:11.8995114Z 
2022-08-17T05:34:11.8995350Z ----------------------------------------------------------------------
2022-08-17T05:34:11.8995595Z Ran 85 tests in 0.415s

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (crossref, 2, 2, linux.2xlarge) (5/6)

Step: "Test" (full log | diagnosis details)

2022-08-17T05:44:57.2796303Z FAIL [0.001s]: tes...a_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T05:44:57.2733877Z     registered at /var/lib/jenkins/workspace/build/aten/src/ATen/RegisterSchema.cpp:6
2022-08-17T05:44:57.2734150Z   dispatch key: ZeroTensor
2022-08-17T05:44:57.2734646Z   previous kernel: registered at /var/lib/jenkins/workspace/aten/src/ATen/BatchingRegistrations.cpp:1089
2022-08-17T05:44:57.2735112Z        new kernel: registered at /dev/null:628 (Triggered internally at /var/lib/jenkins/workspace/aten/src/ATen/core/dispatch/OperatorEntry.cpp:139.)
2022-08-17T05:44:57.2735459Z   self.m.impl(name, dispatch_key, fn)
2022-08-17T05:44:57.2736352Z ok (0.004s)
2022-08-17T05:44:57.2756528Z   test_override_cpu_sum (__main__.TestPythonRegistration) ... ok (0.002s)
2022-08-17T05:44:57.2795351Z   test_override_cuda_with_jiterator (__main__.TestPythonRegistration) ... ok (0.004s)
2022-08-17T05:44:57.2795747Z 
2022-08-17T05:44:57.2795902Z ======================================================================
2022-08-17T05:44:57.2796303Z FAIL [0.001s]: test_metadata_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T05:44:57.2797048Z ----------------------------------------------------------------------
2022-08-17T05:44:57.2797363Z Traceback (most recent call last):
2022-08-17T05:44:57.2797664Z   File "test_python_dispatch.py", line 451, in test_metadata_change_not_allowed
2022-08-17T05:44:57.2797970Z     self.assertRaises(RuntimeError, lambda: y.resize_(4))
2022-08-17T05:44:57.2798432Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 2450, in assertRaises
2022-08-17T05:44:57.2798797Z     return super().assertRaises(expected_exception, *args, **kwargs)
2022-08-17T05:44:57.2799163Z AssertionError: RuntimeError not raised by <lambda>
2022-08-17T05:44:57.2799328Z 
2022-08-17T05:44:57.2799528Z ----------------------------------------------------------------------
2022-08-17T05:44:57.2799780Z Ran 85 tests in 0.460s

See GitHub Actions build pull / win-vs2019-cpu-py3 / test (default, 1, 2, windows.4xlarge) (6/6)

Step: "Test" (full log | diagnosis details)

2022-08-17T06:10:20.7201971Z FAIL [0.000s]: tes...a_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T06:10:20.7130379Z     registered at C:\actions-runner\_work\pytorch\pytorch\build\aten\src\ATen\RegisterSchema.cpp:6
2022-08-17T06:10:20.7130696Z   dispatch key: ZeroTensor
2022-08-17T06:10:20.7131056Z   previous kernel: registered at C:\actions-runner\_work\pytorch\pytorch\aten\src\ATen\BatchingRegistrations.cpp:1089
2022-08-17T06:10:20.7131579Z        new kernel: registered at /dev/null:550 (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\aten\src\ATen\core\dispatch\OperatorEntry.cpp:139.)
2022-08-17T06:10:20.7132717Z   self.m.impl(name, dispatch_key, fn)
2022-08-17T06:10:20.7133164Z ok (0.016s)
2022-08-17T06:10:20.7154089Z   test_override_cpu_sum (__main__.TestPythonRegistration) ... ok (0.000s)
2022-08-17T06:10:20.7201055Z   test_override_cuda_with_jiterator (__main__.TestPythonRegistration) ... ok (0.000s)
2022-08-17T06:10:20.7201284Z 
2022-08-17T06:10:20.7201650Z ======================================================================
2022-08-17T06:10:20.7201971Z FAIL [0.000s]: test_metadata_change_not_allowed (__main__.TestPythonDispatch)
2022-08-17T06:10:20.7202304Z ----------------------------------------------------------------------
2022-08-17T06:10:20.7202586Z Traceback (most recent call last):
2022-08-17T06:10:20.7203030Z   File "C:\actions-runner\_work\pytorch\pytorch\test\test_python_dispatch.py", line 451, in test_metadata_change_not_allowed
2022-08-17T06:10:20.7203415Z     self.assertRaises(RuntimeError, lambda: y.resize_(4))
2022-08-17T06:10:20.7203856Z   File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\testing\_internal\common_utils.py", line 2450, in assertRaises
2022-08-17T06:10:20.7204281Z     return super().assertRaises(expected_exception, *args, **kwargs)
2022-08-17T06:10:20.7204577Z AssertionError: RuntimeError not raised by <lambda>
2022-08-17T06:10:20.7204723Z 
2022-08-17T06:10:20.7204945Z ----------------------------------------------------------------------
2022-08-17T06:10:20.7205227Z Ran 85 tests in 1.188s

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@ezyang ezyang requested a review from albanD August 17, 2022 04:14
This PR is to flush out test failures.  We will then remove the
logic in subsequent PRs.

Signed-off-by: Edward Z. Yang <ezyangfb.com>

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Aug 17, 2022
This PR is to flush out test failures.  We will then remove the
logic in subsequent PRs.

Signed-off-by: Edward Z. Yang <ezyangfb.com>

ghstack-source-id: 37651ac
Pull Request resolved: #83545
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM
🎉

@ezyang
Copy link
Contributor Author

ezyang commented Aug 17, 2022

@bdhirsh is going to grind through the rest of the test failures

bdhirsh added a commit that referenced this pull request Aug 17, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 17, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 18, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 18, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 18, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 18, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 19, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 19, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 19, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 19, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).





[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Aug 19, 2022
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc @albanD @ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).

Pull Request resolved: #83590
Approved by: https://github.com/ezyang
facebook-github-bot pushed a commit that referenced this pull request Aug 23, 2022
Summary:
Make it so that it is valid to set metadata after detach calls, like `x.detach().resize_(...)`.

This technically lifts some restrictions around `.data`. This PR means that you can now technically call `x.data.resize_(...)`, which can now directly resize `x` instead of erroring.

My understanding: Before the tensor-variable merge, when `x` and `x.data` were really different tensors, you could resize `x.data` independently of `x`, and during the merge, this error was added to avoid silent confusing behavior changes.

It was agreed that this error has been around long enough (several years) that it's acceptable to drop.  cc albanD ezyang.

(Ed already had a prototype PR [here](#83545) - I ended up making one to try to slog through test failures).

Pull Request resolved: #83590
Approved by: https://github.com/ezyang

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/0c24af498578480547822bce5c3aa43a6fa8b920

Reviewed By: seemethere

Differential Revision: D38910832

Pulled By: bdhirsh

fbshipit-source-id: 85cdbda9825547b35ec5d09f7ff3ca4c2b6996c3
@ezyang ezyang closed this Aug 23, 2022
@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1336/head branch September 22, 2022 14:19
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.

3 participants