Skip to content

Conversation

@xta0
Copy link
Contributor

@xta0 xta0 commented Nov 15, 2019

Stack from ghstack:

Summary

Currently, we have a deadlock issue on iOS when running Resnet50. The problem happens when the task being run in the ThreadPool wants to call getNumThread() who will try to acquire the same mutex. And thus cause the deadlock situation. The fix is just remove the guard for _numThreads, as it's not likely to change after initialization.

Test Plan

  1. Generate a Resnet50 model using trace_model.py
  2. Run ios/TestApp/bootstrap.sh to do the benchmark

cc @shoumikhin @AshkanAliabadi

Differential Revision: D18533505

@xta0 xta0 requested review from ilia-cher and ljk53 November 15, 2019 02:25
### Summary

Currently, we have a deadlock issue on iOS when running Resnet50. The problem happens when the task being run in the ThreadPool wants to call `getNumThread()` who will require the same mutex. And thus cause the deadlock.

### Test Plan

1. Generate a Resnet50 model using trace_model.py
2. Run `ios/TestApp/bootstrap.sh` to do the benchmark
xta0 added a commit that referenced this pull request Nov 15, 2019
ghstack-source-id: b79d92b
Pull Request resolved: #29885
@facebook-github-bot
Copy link
Contributor

@xta0 merged this pull request in b730d04.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Nov 16, 2019
Summary:
Pull Request resolved: pytorch/pytorch#29885

### Summary

Currently, we have a deadlock issue on iOS when running Resnet50. The problem happens when the task being run in the ThreadPool wants to call `getNumThread()` who will try to acquire the same mutex. And thus cause the deadlock situation. The fix is just remove the guard for `_numThreads`, as it's not likely to change after initialization.

### Test Plan

1. Generate a Resnet50 model using trace_model.py
2. Run `ios/TestApp/bootstrap.sh` to do the benchmark

cc shoumikhin AshkanAliabadi

Test Plan: Imported from OSS

Differential Revision: D18533505

Pulled By: xta0

fbshipit-source-id: 2a069d20b59833ec8b02ff05515c3739a85a15de
@facebook-github-bot facebook-github-bot deleted the gh/xta0/40/head branch November 19, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants