Enable stateless XNNPACK linear. (#35791)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35791
The optimal solution to use XNNPACK is to separate operator creation
from execution - also called prepacking the weights. If we have done
our job properly, JIT must have caught and replaced nn.Linear on mobile
with the prepacked versions. Still, if we somehow end up in
at::native::linear for whatever reason, it is still more efficient to go
through XNNPACK than the alternatives of at::addmm or at::matmul.
Differential Revision: D20821863
Test Plan: Imported from OSS
Pulled By: AshkanAliabadi
fbshipit-source-id: 5a75bfd900435c89c1b8536dc09248e788292e0c