-
Notifications
You must be signed in to change notification settings - Fork 743
Error out if registering prim ops multiple times #8172
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8172
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 2 Unrelated FailuresAs of commit 092e032 with merge base 58c725c ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D69090850 |
b4df9a3 to
9741e53
Compare
Summary:
Using `executorch_ops_check` should error out if the dependencies includes 2 libraries of `prim_op_registry`. For example:
The target `//arvr/libraries/wristband/tsn/transformers:TorchstreamTransformerTest` depends on both `prim_ops_registry` and `prim_ops_registry_aten`. BUCK query:
```
buck2 uquery "filter('prim_ops_registry(?:_static|_aten)?$', deps(//arvr/libraries/wristband/tsn/transformers:
TorchstreamTransformerTest))"
Buck UI: https://www.internalfb.com/buck2/1401c12c-0ef2-4ba8-8d4e-6b86871d708f
Network: Up: 0B Down: 0B
Command: uquery.
Time elapsed: 3.6s
fbcode//executorch/kernels/prim_ops:prim_ops_registry
fbcode//executorch/kernels/prim_ops:prim_ops_registry_aten
fbsource//xplat/executorch/kernels/prim_ops:prim_ops_registry
fbsource//xplat/executorch/kernels/prim_ops:prim_ops_registry_aten
```
This will cause the error like this:
```
E 00:00:00.032942 executorch:operator_registry.cpp:86] Re-registering aten::sym_size.int, from /data/users/larryliu/fbsource/buck-out/v2/gen/fbsource/cfdc20bd56300721/arvr/libraries/wristband/tsn/transformers/__TorchstreamTransformerTest__/./__TorchstreamTransformerTest__shared_libs_symlink_tree/libexecutorc$
E 00:00:00.033022 executorch:operator_registry.cpp:87] key: (null), is_fallback: true
F 00:00:00.033033 executorch:operator_registry.cpp:111] In function register_kernels(), assert failed (false): Kernel registration failed with error 18, see error log for details.
```
To catch issues like this, we should error out when user uses `executorch_ops_check` to debug.
```
executorch_ops_check(
name = "my_executorch_test_check",
deps = [":TorchstreamTransformerTest"],
)
```
Fixing the internal portion of [#8171](#8171)
Differential Revision: D69090850
|
This pull request was exported from Phabricator. Differential Revision: D69090850 |
lucylq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, thank you!
Summary:
Using `executorch_ops_check` should error out if the dependencies includes 2 libraries of `prim_op_registry`. For example:
The target `//arvr/libraries/wristband/tsn/transformers:TorchstreamTransformerTest` depends on both `prim_ops_registry` and `prim_ops_registry_aten`. BUCK query:
```
buck2 uquery "filter('prim_ops_registry(?:_static|_aten)?$', deps(//arvr/libraries/wristband/tsn/transformers:
TorchstreamTransformerTest))"
Buck UI: https://www.internalfb.com/buck2/1401c12c-0ef2-4ba8-8d4e-6b86871d708f
Network: Up: 0B Down: 0B
Command: uquery.
Time elapsed: 3.6s
fbcode//executorch/kernels/prim_ops:prim_ops_registry
fbcode//executorch/kernels/prim_ops:prim_ops_registry_aten
fbsource//xplat/executorch/kernels/prim_ops:prim_ops_registry
fbsource//xplat/executorch/kernels/prim_ops:prim_ops_registry_aten
```
This will cause the error like this:
```
E 00:00:00.032942 executorch:operator_registry.cpp:86] Re-registering aten::sym_size.int, from /data/users/larryliu/fbsource/buck-out/v2/gen/fbsource/cfdc20bd56300721/arvr/libraries/wristband/tsn/transformers/__TorchstreamTransformerTest__/./__TorchstreamTransformerTest__shared_libs_symlink_tree/libexecutorc$
E 00:00:00.033022 executorch:operator_registry.cpp:87] key: (null), is_fallback: true
F 00:00:00.033033 executorch:operator_registry.cpp:111] In function register_kernels(), assert failed (false): Kernel registration failed with error 18, see error log for details.
```
To catch issues like this, we should error out when user uses `executorch_ops_check` to debug.
```
executorch_ops_check(
name = "my_executorch_test_check",
deps = [":TorchstreamTransformerTest"],
)
```
Fixing the internal portion of [#8171](#8171)
Reviewed By: lucylq
Differential Revision: D69090850
9741e53 to
092e032
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69090850 |
Summary:
Using
executorch_ops_checkshould error out if the dependencies includes 2 libraries ofprim_op_registry. For example:The target
//arvr/libraries/wristband/tsn/transformers:TorchstreamTransformerTestdepends on bothprim_ops_registryandprim_ops_registry_aten. BUCK query:This will cause the error like this:
To catch issues like this, we should error out when user uses
executorch_ops_checkto debug.Fixing the internal portion of #8171
Differential Revision: D69090850