Nothing Special   »   [go: up one dir, main page]

Skip to content
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

[4/N] Nnapi backend delegation preprocess: List Tensors & Comment Updates #61752

Closed
wants to merge 2 commits into from

Conversation

Amyh11325
Copy link
Contributor
@Amyh11325 Amyh11325 commented Jul 16, 2021

Stack from ghstack:

Updated Android NNAPI preprocess, so that it can accept both single Tensor inputs and Tensor List inputs.

  • The inputs are not real data, but input parameters for shape, dtype, quantization, and dimorder that are bundled as a Tensor. Comments were updated to make this clearer.
  • In the future, preprocess will also accept a dedicated NnapiArg object.

Compile_spec should have the following format:
{"forward": {"inputs": at::Tensor}} OR {"forward": {"inputs": c10::Listat::Tensor}}
Example input Tensor:
torch.tensor([[1.0, -1.0, 2.0, -2.0]]).unsqueeze(-1).unsqueeze(-1)

Testing
OSS testing is blocked by #61594. Testing was done locally in
TODO: Add OSS tests for single Tensor and Tensor List inputs.

Differential Revision: D29726432

…ates

Updated Android NNAPI preprocess, so that it can accept both single Tensor inputs and Tensor List inputs.
-The inputs are not real data, but input parameters for shape, dtype, quantization, and dimorder that are bundled as a Tensor. Comments were updated to make this clearer.
-In the future, preprocess will also accept a dedicated NnapiArg object.

Compile_spec should have the following format:
{"forward": {"inputs": at::Tensor}} OR {"forward": {"inputs": c10::List<at::Tensor>}}
Example input Tensor:
torch.tensor([[1.0, -1.0, 2.0, -2.0]]).unsqueeze(-1).unsqueeze(-1)

###Testing
OSS testing is blocked by #61594. Testing was done locally in
TODO: Add OSS tests for single Tensor and Tensor List inputs.

Differential Revision: [D29726432](https://our.internmc.facebook.com/intern/diff/D29726432/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor
facebook-github-bot commented Jul 16, 2021

💊 CI failures summary and remediations

As of commit d18fa5d (more details on the Dr. CI page and at hud.pytorch.org/pr/61752):


  • 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 CircleCI build pytorch_macos_10_13_py3_test (1/1)

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

Jul 16 23:52:50 test_remote_message_script_de...yUniqueId(created_on=0, local_id=0) to be created.
Jul 16 23:52:22 frame #12: std::__1::__function::__func<std::__1::__bind<torch::distributed::rpc::ProcessGroupAgent::enqueueRecv(torch::distributed::rpc::RecvWork)::$_6, torch::distributed::rpc::RecvWork>, std::__1::allocator<std::__1::__bind<torch::distributed::rpc::ProcessGroupAgent::enqueueRecv(torch::distributed::rpc::RecvWork)::$_6, torch::distributed::rpc::RecvWork> >, void ()>::operator()() + 42 (0x11834137a in libtorch_cpu.dylib)
Jul 16 23:52:22 frame #13: c10::ThreadPool::main_loop(unsigned long) + 569 (0x1127c1369 in libc10.dylib)
Jul 16 23:52:22 frame #14: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, c10::ThreadPool::ThreadPool(int, int, std::__1::function<void ()>)::$_0> >(void*) + 67 (0x1127c1a13 in libc10.dylib)
Jul 16 23:52:22 frame #15: _pthread_start + 148 (0x7fff6ddc1109 in libsystem_pthread.dylib)
Jul 16 23:52:22 frame #16: thread_start + 15 (0x7fff6ddbcb8b in libsystem_pthread.dylib)
Jul 16 23:52:22 
Jul 16 23:52:22 ok (3.984s)
Jul 16 23:52:30   test_remote_message_dropped_pickle (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (8.375s)
Jul 16 23:52:39   test_remote_message_dropped_pickle_to_self (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (8.323s)
Jul 16 23:52:46   test_remote_message_script_delay_timeout (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (7.214s)
Jul 16 23:52:50   test_remote_message_script_delay_timeout_to_self (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... [E request_callback_no_python.cpp:555] Received error while processing request type 260: falseINTERNAL ASSERT FAILED at "../torch/csrc/distributed/rpc/rref_context.cpp":390, please report a bug to PyTorch. Expected OwnerRRef with id GloballyUniqueId(created_on=0, local_id=0) to be created.
Jul 16 23:52:50 Exception raised from getOwnerRRef at ../torch/csrc/distributed/rpc/rref_context.cpp:390 (most recent call first):
Jul 16 23:52:50 frame #0: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 98 (0x1066066b2 in libc10.dylib)
Jul 16 23:52:50 frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 106 (0x106604e2a in libc10.dylib)
Jul 16 23:52:50 frame #2: c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 64 (0x106605060 in libc10.dylib)
Jul 16 23:52:50 frame #3: torch::distributed::rpc::RRefContext::getOwnerRRef(torch::distributed::rpc::GloballyUniqueId const&, bool) + 1711 (0x11470287f in libtorch_cpu.dylib)
Jul 16 23:52:50 frame #4: torch::distributed::rpc::RequestCallbackNoPython::assignOwnerRRef(torch::distributed::rpc::GloballyUniqueId const&, torch::distributed::rpc::GloballyUniqueId const&, c10::intrusive_ptr<c10::ivalue::Future, c10::detail::intrusive_target_default_null_type<c10::ivalue::Future> >) const + 86 (0x1146ed0d6 in libtorch_cpu.dylib)
Jul 16 23:52:50 frame #5: torch::distributed::rpc::RequestCallbackImpl::processScriptRemoteCall(torch::distributed::rpc::RpcCommandBase&, std::__1::vector<c10::Stream, std::__1::allocator<c10::Stream> >) const + 376 (0x1107af608 in libtorch_python.dylib)
Jul 16 23:52:50 frame #6: torch::distributed::rpc::RequestCallbackNoPython::processRpc(torch::distributed::rpc::RpcCommandBase&, torch::distributed::rpc::MessageType const&, std::__1::vector<c10::Stream, std::__1::allocator<c10::Stream> >) const + 437 (0x1146ebd25 in libtorch_cpu.dylib)
Jul 16 23:52:50 frame #7: torch::distributed::rpc::RequestCallbackImpl::processRpcWithErrors(torch::distributed::rpc::RpcCommandBase&, torch::distributed::rpc::MessageType const&, std::__1::vector<c10::Stream, std::__1::allocator<c10::Stream> >) const + 74 (0x1107b037a in libtorch_python.dylib)
Jul 16 23:52:50 frame #8: c10::intrusive_ptr<c10::ivalue::Future, c10::detail::intrusive_target_default_null_type<c10::ivalue::Future> > c10::ivalue::Future::thenAsync<torch::distributed::rpc::RequestCallbackNoPython::processMessage(torch::distributed::rpc::Message&, std::__1::vector<c10::Stream, std::__1::allocator<c10::Stream> >) const::$_1>(torch::distributed::rpc::RequestCallbackNoPython::processMessage(torch::distributed::rpc::Message&, std::__1::vector<c10::Stream, std::__1::allocator<c10::Stream> >) const::$_1, std::__1::shared_ptr<c10::Type>)::'lambda'(c10::ivalue::Future&)::operator()(c10::ivalue::Future&) + 223 (0x1146f39ef in libtorch_cpu.dylib)

Preview docs built from this PR

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

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

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added cla signed oncall: jit Add this issue/PR to JIT oncall triage queue labels Jul 16, 2021
Amyh11325 pushed a commit that referenced this pull request Jul 16, 2021
…ates

Updated Android NNAPI preprocess, so that it can accept both single Tensor inputs and Tensor List inputs.
-The inputs are not real data, but input parameters for shape, dtype, quantization, and dimorder that are bundled as a Tensor. Comments were updated to make this clearer.
-In the future, preprocess will also accept a dedicated NnapiArg object.

Compile_spec should have the following format:
{"forward": {"inputs": at::Tensor}} OR {"forward": {"inputs": c10::List<at::Tensor>}}
Example input Tensor:
torch.tensor([[1.0, -1.0, 2.0, -2.0]]).unsqueeze(-1).unsqueeze(-1)

###Testing
OSS testing is blocked by #61594. Testing was done locally in
TODO: Add OSS tests for single Tensor and Tensor List inputs.

Differential Revision: [D29726432](https://our.internmc.facebook.com/intern/diff/D29726432/)

ghstack-source-id: 133656416
Pull Request resolved: #61752
…Comment Updates"


Updated Android NNAPI preprocess, so that it can accept both single Tensor inputs and Tensor List inputs.
- The inputs are not real data, but input parameters for shape, dtype, quantization, and dimorder that are bundled as a Tensor. Comments were updated to make this clearer.
- In the future, preprocess will also accept a dedicated NnapiArg object.

Compile_spec should have the following format:
{"forward": {"inputs": at::Tensor}} OR {"forward": {"inputs": c10::List<at::Tensor>}}
Example input Tensor:
torch.tensor([[1.0, -1.0, 2.0, -2.0]]).unsqueeze(-1).unsqueeze(-1)

**Testing**
OSS testing is blocked by #61594. Testing was done locally in
TODO: Add OSS tests for single Tensor and Tensor List inputs.

Differential Revision: [D29726432](https://our.internmc.facebook.com/intern/diff/D29726432/)

[ghstack-poisoned]
Amyh11325 pushed a commit that referenced this pull request Jul 16, 2021
…ates

Pull Request resolved: #61752

Updated Android NNAPI preprocess, so that it can accept both single Tensor inputs and Tensor List inputs.
- The inputs are not real data, but input parameters for shape, dtype, quantization, and dimorder that are bundled as a Tensor. Comments were updated to make this clearer.
- In the future, preprocess will also accept a dedicated NnapiArg object.

Compile_spec should have the following format:
{"forward": {"inputs": at::Tensor}} OR {"forward": {"inputs": c10::List< at::Tensor >}}
Example input Tensor:
torch.tensor([[1.0, -1.0, 2.0, -2.0]]).unsqueeze(-1).unsqueeze(-1)

### Testing
OSS testing is blocked by #61594. Testing was done locally in D29726948
TODO: Add OSS tests for single Tensor and Tensor List inputs.
ghstack-source-id: 133683735

Differential Revision: [D29726432](https://our.internmc.facebook.com/intern/diff/D29726432/)
Copy link
Contributor
@iseeyuan iseeyuan left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6349bde.

Copy link
Contributor
@raziel raziel left a comment

Choose a reason for hiding this comment

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

Thanks

@facebook-github-bot facebook-github-bot deleted the gh/Amyh11325/9/head branch July 20, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged oncall: jit Add this issue/PR to JIT oncall triage queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants