Skip to content

Conversation

@larryliu0820
Copy link
Contributor

Summary:
This change adds the following logic:

If lightweight dispatch is enabled, do not generate TORCH_LIBARAY API calls for operator schema and implementations, since these operators will be registered into JIT op registry.

skip_dispatcher_op_registration is an existing argument to gen.py. With that set, RegisterDispatchKey.cpp will not generate m.def and m.impl for each native function. This logic will be removed once we find a better way to skip op registration into dispatcher.

Test Plan: Rely on unit tests for lightweight dispatch.

Differential Revision: D34634300

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 24, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 1e72c89 (more details on the Dr. CI page):


  • 3/4 failures introduced in this PR
  • 1/4 broken upstream at merge base 5b915e8 on Mar 24 from 7:29am to 3:17pm

🕵️ 2 new failures recognized by patterns

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

See GitHub Actions build pull / linux-docs / build-docs (python) (1/2)

Step: "Build python docs" (full log | diagnosis details | 🔁 rerun)

2022-03-24T20:51:33.4030309Z ImportError: canno...da/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T20:51:33.4026860Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/cmd/build.py", line 25, in <module>
2022-03-24T20:51:33.4027153Z     from sphinx.application import Sphinx
2022-03-24T20:51:33.4027515Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/application.py", line 43, in <module>
2022-03-24T20:51:33.4027827Z     from sphinx.registry import SphinxComponentRegistry
2022-03-24T20:51:33.4028206Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/registry.py", line 24, in <module>
2022-03-24T20:51:33.4028500Z     from sphinx.builders import Builder
2022-03-24T20:51:33.4028869Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 26, in <module>
2022-03-24T20:51:33.4029199Z     from sphinx.util import import_object, logging, progress_message, rst, status_iterator
2022-03-24T20:51:33.4029598Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/util/rst.py", line 21, in <module>
2022-03-24T20:51:33.4029888Z     from jinja2 import Environment, environmentfilter
2022-03-24T20:51:33.4030309Z ImportError: cannot import name 'environmentfilter' from 'jinja2' (/opt/conda/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T20:51:33.4394260Z Makefile:38: recipe for target 'html' failed
2022-03-24T20:51:33.4394650Z make[1]: *** [html] Error 1
2022-03-24T20:51:33.4395164Z make[1]: Leaving directory '/var/lib/jenkins/workspace/docs'
2022-03-24T20:51:33.4395696Z Makefile:27: recipe for target 'html-stable' failed
2022-03-24T20:51:33.4396222Z make: *** [html-stable] Error 2
2022-03-24T20:51:33.4397093Z ++ code=2
2022-03-24T20:51:33.4397427Z ++ '[' 2 -ne 0 ']'
2022-03-24T20:51:33.4397727Z ++ set +x
2022-03-24T20:51:33.4398017Z =========================
2022-03-24T20:51:33.4408290Z =========================

See GitHub Actions build pull / win-vs2019-cuda11.3-py3 / test (default, 2, 2, windows.8xlarge.nvidia.gpu) (2/2)

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

2022-03-24T23:51:47.4487825Z RuntimeError: test_torch failed!
2022-03-24T23:51:34.4899729Z [TORCH_VITAL] Dataloader.basic_unit_test		 TEST_VALUE_STRING
2022-03-24T23:51:34.4900518Z [TORCH_VITAL] Dataloader.enabled		 True
2022-03-24T23:51:46.9108976Z [TORCH_VITAL] CUDA.used		 true
2022-03-24T23:51:46.9109830Z [TORCH_VITAL] Dataloader.basic_unit_test		 TEST_VALUE_STRING
2022-03-24T23:51:46.9122242Z [TORCH_VITAL] Dataloader.enabled		 True
2022-03-24T23:51:47.4471193Z Traceback (most recent call last):
2022-03-24T23:51:47.4485087Z   File "run_test.py", line 1054, in <module>
2022-03-24T23:51:47.4485745Z     main()
2022-03-24T23:51:47.4486538Z   File "run_test.py", line 1032, in main
2022-03-24T23:51:47.4487208Z     raise RuntimeError(err_message)
2022-03-24T23:51:47.4487825Z RuntimeError: test_torch failed!
2022-03-24T23:51:49.9663323Z 
2022-03-24T23:51:49.9667249Z (base) C:\actions-runner\_work\pytorch\pytorch\test>popd
2022-03-24T23:51:49.9694142Z 
2022-03-24T23:51:49.9707586Z (base) C:\actions-runner\_work\pytorch\pytorch>if ERRORLEVEL 1 exit /b 1 
2022-03-24T23:51:50.1103149Z + cleanup
2022-03-24T23:51:50.1118334Z + retcode=1
2022-03-24T23:51:50.1118898Z + set +x
2022-03-24T23:51:50.2384771Z ##[error]Process completed with exit code 1.
2022-03-24T23:51:51.1716333Z ##[group]Run pytorch/pytorch/.github/actions/upload-test-artifacts@master
2022-03-24T23:51:51.1717469Z with:

1 failure not recognized by patterns:

Job Step Action
GitHub Actions pull / linux-docs / build-docs (cpp) Unknown 🔁 rerun

🚧 1 fixed upstream failure:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

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.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D34634300

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Mar 24, 2022
@facebook-github-bot
Copy link
Contributor

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

…ch (pytorch#74664)

Summary:
This change adds the following logic:

If lightweight dispatch is enabled, do not generate `TORCH_LIBARAY` API calls for operator schema and implementations, since these operators will be registered into JIT op registry.

`skip_dispatcher_op_registration` is an existing argument to `gen.py`. With that set, `RegisterDispatchKey.cpp` will not generate `m.def` and `m.impl` for each native function. This logic will be removed once we find a better way to skip op registration into dispatcher.

Pull Request resolved: pytorch#74664

Test Plan: Rely on unit tests for lightweight dispatch.

Reviewed By: priyaramani

Differential Revision: D34634300

Pulled By: larryliu0820

fbshipit-source-id: 9bf9c44a019bfc7651a357640bec9e5f29ed3bb9
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D34634300

larryliu0820 added a commit to larryliu0820/pytorch that referenced this pull request Mar 24, 2022
…ch (pytorch#74664)

Summary:
This change adds the following logic:

If lightweight dispatch is enabled, do not generate `TORCH_LIBARAY` API calls for operator schema and implementations, since these operators will be registered into JIT op registry.

`skip_dispatcher_op_registration` is an existing argument to `gen.py`. With that set, `RegisterDispatchKey.cpp` will not generate `m.def` and `m.impl` for each native function. This logic will be removed once we find a better way to skip op registration into dispatcher.

Pull Request resolved: pytorch#74664

Test Plan: Rely on unit tests for lightweight dispatch.

Reviewed By: priyaramani

Differential Revision: D34634300

Pulled By: larryliu0820

fbshipit-source-id: 2882b96b30c8e6edadb6efa065c6310747cc08dc
facebook-github-bot pushed a commit that referenced this pull request Mar 25, 2022
…ch (#74664)

Summary:
This change adds the following logic:

If lightweight dispatch is enabled, do not generate `TORCH_LIBARAY` API calls for operator schema and implementations, since these operators will be registered into JIT op registry.

`skip_dispatcher_op_registration` is an existing argument to `gen.py`. With that set, `RegisterDispatchKey.cpp` will not generate `m.def` and `m.impl` for each native function. This logic will be removed once we find a better way to skip op registration into dispatcher.

Pull Request resolved: #74664

Test Plan: Rely on unit tests for lightweight dispatch.

Reviewed By: priyaramani

Differential Revision: D34634300

Pulled By: larryliu0820

fbshipit-source-id: d87828f2c6c62f15024ce9e98823b09ee5a81336
@larryliu0820 larryliu0820 linked an issue Mar 25, 2022 that may be closed by this pull request
shahofblah pushed a commit that referenced this pull request Mar 25, 2022
…ch (#74664)

Summary:
This change adds the following logic:

If lightweight dispatch is enabled, do not generate `TORCH_LIBARAY` API calls for operator schema and implementations, since these operators will be registered into JIT op registry.

`skip_dispatcher_op_registration` is an existing argument to `gen.py`. With that set, `RegisterDispatchKey.cpp` will not generate `m.def` and `m.impl` for each native function. This logic will be removed once we find a better way to skip op registration into dispatcher.

Pull Request resolved: #74664

Test Plan: Rely on unit tests for lightweight dispatch.

Reviewed By: priyaramani

Differential Revision: D34634300

Pulled By: larryliu0820

fbshipit-source-id: d87828f2c6c62f15024ce9e98823b09ee5a81336
(cherry picked from commit 3eb1c27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed fb-exported oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PyTorch] Lightweight dispatch

2 participants