Skip to content

Make proxy tensor uses modes correctly, not repeating code between the subclass and mode#81708

Closed
samdow wants to merge 5 commits intogh/samdow/13/basefrom
gh/samdow/13/head
Closed

Make proxy tensor uses modes correctly, not repeating code between the subclass and mode#81708
samdow wants to merge 5 commits intogh/samdow/13/basefrom
gh/samdow/13/head

Conversation

@samdow
Copy link
Contributor

@samdow samdow commented Jul 19, 2022

Stack from ghstack (oldest at bottom):

After I wrote this mode, Ed and I talked about what the proper thing to do when a subclass and mode want to do basically the same thing during torch dispatch. We ended up deciding that the mode would lead and the subclass would just enable the mode and call the function again (since modes go first, when the python key is reenabled it will hit the mode and not infinite loop). This fixes ProxyTensor to do this

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 19, 2022

🔗 Helpful links

❌ 1 New Failures

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

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

🕵️ 1 new failure recognized by patterns

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

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

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

2022-07-28T22:03:22.9973095Z RuntimeError: test_ops failed!
2022-07-28T22:03:19.6629325Z Generated XML report: test-reports/python-unittest/test_ops/TEST-TestCommonCUDA-20220728204354.xml
2022-07-28T22:03:19.8183870Z Generated XML report: test-reports/python-unittest/test_ops/TEST-TestCompositeComplianceCUDA-20220728204354.xml
2022-07-28T22:03:19.8741272Z Generated XML report: test-reports/python-unittest/test_ops/TEST-TestFakeTensorNonErroringCUDA-20220728204354.xml
2022-07-28T22:03:20.0319082Z Generated XML report: test-reports/python-unittest/test_ops/TEST-TestMathBitsCUDA-20220728204354.xml
2022-07-28T22:03:20.1270844Z Generated XML report: test-reports/python-unittest/test_ops/TEST-TestTagsCUDA-20220728204354.xml
2022-07-28T22:03:22.9967155Z Traceback (most recent call last):
2022-07-28T22:03:22.9967608Z   File "/var/lib/jenkins/workspace/test/run_test.py", line 973, in <module>
2022-07-28T22:03:22.9968999Z     main()
2022-07-28T22:03:22.9969335Z   File "/var/lib/jenkins/workspace/test/run_test.py", line 951, in main
2022-07-28T22:03:22.9972751Z     raise RuntimeError(err_message)
2022-07-28T22:03:22.9973095Z RuntimeError: test_ops failed!
2022-07-28T22:03:23.2572310Z 
2022-07-28T22:03:23.2572928Z real	106m31.243s
2022-07-28T22:03:23.2573215Z user	105m40.610s
2022-07-28T22:03:23.2573885Z sys	4m10.630s
2022-07-28T22:03:23.2616841Z ##[error]Process completed with exit code 1.
2022-07-28T22:03:23.2660596Z Prepare all required actions
2022-07-28T22:03:23.2661036Z Getting action download info
2022-07-28T22:03:23.4691072Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-07-28T22:03:23.4691372Z with:
2022-07-28T22:03:23.4691825Z   github-token: ***

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.

samdow pushed a commit that referenced this pull request Jul 19, 2022
…e subclass and mode

ghstack-source-id: 42b69b3
Pull Request resolved: #81708
… between the subclass and mode"

[ghstack-poisoned]
… between the subclass and mode"

[ghstack-poisoned]
… between the subclass and mode"


After I wrote this mode, Ed and I talked about what the proper thing to do when a subclass and mode want to do basically the same thing during torch dispatch. We ended up deciding that the mode would lead and the subclass would just enable the mode and call the function again (since modes go first, when the python key is reenabled it will hit the mode and not infinite loop). This fixes ProxyTensor to follow this

[ghstack-poisoned]
samdow pushed a commit that referenced this pull request Jul 19, 2022
…e subclass and mode

ghstack-source-id: 066bf59
Pull Request resolved: #81708
… between the subclass and mode"


After I wrote this mode, Ed and I talked about what the proper thing to do when a subclass and mode want to do basically the same thing during torch dispatch. We ended up deciding that the mode would lead and the subclass would just enable the mode and call the function again (since modes go first, when the python key is reenabled it will hit the mode and not infinite loop). This fixes ProxyTensor to do this

[ghstack-poisoned]
samdow pushed a commit that referenced this pull request Jul 28, 2022
…e subclass and mode

ghstack-source-id: 6a0e7c5
Pull Request resolved: #81708
@samdow samdow closed this Aug 17, 2022
@facebook-github-bot facebook-github-bot deleted the gh/samdow/13/head branch September 17, 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.

2 participants