[pytorch] Make qlinear weight packing thread safe (#63804)
authorJohn Shen <johnshen@fb.com>
Thu, 9 Sep 2021 16:30:32 +0000 (09:30 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 9 Sep 2021 16:31:48 +0000 (09:31 -0700)
commitc3203efe808c5d042e1acd20d19467bcff597487
treeb2fa96709399dd1b3a403ddb9ba8bfc1e1820fd1
parentdc535466557f190e3014f9a94b24dfa500119c02
[pytorch] Make qlinear weight packing thread safe (#63804)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63804

Adding a lock around weight packing section of qlinear + qlinear_dynamic

Test Plan: automated tests

Reviewed By: kimishpatel

Differential Revision: D30340957

fbshipit-source-id: 1c9faf796c4ffbc74345396188a6f1154a76bea6
aten/src/ATen/native/quantized/cpu/qlinear.cpp
aten/src/ATen/native/quantized/cpu/qlinear_dynamic.cpp
aten/src/ATen/native/quantized/cpu/qnnpack_utils.h