pytorch
b730d04e - Fix deadlock issues in ThreadPool (#29885)

Commit
5 years ago
Fix deadlock issues in ThreadPool (#29885) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/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
Author
Parents
Loading