add quantized layer norm implementation (#35329)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35329
Adds a quantized implementation of LayerNorm for server.
A future PR will add the Python wrapper.
Test Plan:
numerics match the floating point implementation
benchmarks by input size:
v1 (mean+var non-vectorized): https://gist.github.com/vkuzo/f6d72c04742608112f4c2e612c74bd13
v2 (mean+var vectorized in float): https://gist.github.com/vkuzo/4dd95657c5b5f3654e0965db00eff8d2
v3 (mean+var vectorized in int, current): https://gist.github.com/vkuzo/57a75f75629da9f23b64b38ca0e3d34b
Imported from OSS
Differential Revision: D20768930
fbshipit-source-id: ddf8727e9840c65ead3b890220af0638c5637028