pytorch
333da3ea - Handle simple tuple type inside Dict (#76164)

Commit
3 years ago
Handle simple tuple type inside Dict (#76164) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/76164 For the case `Dict[int, Tuple[Tensor, Tensor]]`, the value type is a `Tuple`, and their qualified name should be `(Tensor, Tensor)`. Their definition won't be in compilation unit, but type parse can parse it easily. We can just use the default string `(Tensor, Tensor)` directly. ghstack-source-id: 154517975 Test Plan: ``` [chenlai@1833.od /data/sandcastle/boxes/fbsource/fbcode (aba59247a|remote/fbcode/warm)]$ buck test //smart/pytorch_mobile/backport_service:handler_test Starting new Buck daemon... Buck daemon started. DEBUG: /data/sandcastle/boxes/fbsource/tools/build_defs/fbcode_macros/build_defs/lib/cpp_common.bzl:287:14: Using disallowed linker flag 'ANativeActivity_onCreate' in library rule 'fbsource//third-party/toolchains/android-ndk:r18b_native_app_glue' DEBUG: /data/sandcastle/boxes/fbsource/tools/build_defs/fbcode_macros/build_defs/lib/cpp_common.bzl:287:14: Using disallowed linker flag 'arvr/third-party/toolchains/platform009/build/mesa/lib/libGL.so' in library rule 'fbsource//third-party/toolchains:opengl' DEBUG: /data/sandcastle/boxes/fbsource/tools/build_defs/fbcode_macros/build_defs/lib/cpp_common.bzl:287:14: Using disallowed linker flag 'arvr/third-party/freeglut/3.0.0/libs/x64-linux/libglut.a' in library rule 'fbsource//third-party/toolchains:GLUT' Parsing buck files: finished in 26.8 sec Creating action graph: finished in 59.3 sec [RE] Metadata: Session ID=[https://fburl.com/b/reSessionID-2ba31fa4-af8e-4de8-abba-76f0f1f91e45] [RE] Waiting on 0 remote actions. Completed 45 actions remotely, action cache hit rate: 0.00%. Downloaded 12580/12786 artifacts, 985.44 Mbytes, 0.8% cache miss (for updated rules) Building: finished in 01:53.8 min (100%) 30935/30935 jobs, 12722/30935 updated Total time: 03:20.0 min More details at https://www.internalfb.com/intern/buck/build/c3bdc062-413e-4646-9ac4-79cef0af8297 BUILD SUCCEEDED Tpx test run coordinator for Facebook. See https://fburl.com/tpx for details. Running with tpx session id: a7cd4116-3ee3-4db2-9018-9a7c719a4d7b Trace available for this run at /tmp/tpx-20220420-213554.773515-a7cd4116-3ee3-4db2-9018-9a7c719a4d7b/trace.log RemoteExecution session id: reSessionID-a7cd4116-3ee3-4db2-9018-9a7c719a4d7b-tpx Started reporting to test run: https://www.internalfb.com/intern/testinfra/testrun/3940649774928947 ✓ ListingSuccess: smart/pytorch_mobile/backport_service:handler_test : 2 tests discovered (45.162) ✓ Pass: smart/pytorch_mobile/backport_service:handler_test - test_illegal_version_exception (smart.pytorch_mobile.backport_service.handler_test.BackportServiceTest) (0.398) ✓ Pass: smart/pytorch_mobile/backport_service:handler_test - test_backport (smart.pytorch_mobile.backport_service.handler_test.BackportServiceTest) (21.871) Summary Pass: 2 ListingSuccess: 1 ``` Reviewed By: malfet, pavithranrao, guangy10 Differential Revision: D35805700 fbshipit-source-id: d40288715ec336c06dc8a91244dd5576b0af287c (cherry picked from commit e908737fc37901ff2cb153936e3a57074146ba3a)
Author
Committer
Parents
Loading