End to end hack to call server side Caffe2 ops (#18267)
authorDmytro Dzhulgakov <dzhulgakov@fb.com>
Fri, 22 Mar 2019 18:11:16 +0000 (11:11 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 22 Mar 2019 18:17:45 +0000 (11:17 -0700)
commit7397eb7e8edb0bb1f3d467acaa5f1c5648d50901
treeb8ce5a0f25d7f8d8410aab968ff0a21a1bdd3771
parentf6df6aed89c00f3baa270998417ce2b8ca5756c9
End to end hack to call server side Caffe2 ops (#18267)

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

Motivation: we don't actually want to use it for real under any circumstances. This is an idea to unblock our internal progress and parallelize workstreams. We can easily define schemas for all ops in question and implement forwarding to C2 ops which is NOT going to be performant. Then several things can be happening in parallel:
* move code of ops outside of C2 ops that depend on protobuf into c10
* development of optimization/fusion passes
* building python-level wrappers with clean API
* improving perf

This demonstrates, Relu, quant, dequant. It seems to cover all use cases necessary (maybe except weights prepacking). Ideally I'd demonstrate Conv, but will get to it later in a separate PR (contributions welcomed)

Reviewed By: ezyang

Differential Revision: D14531232

fbshipit-source-id: 4cd4a71ae0cb373c6c0e81f965c442b82a1b4069
test/test_quantized.py [new file with mode: 0644]
tools/build_variables.py
tools/run-clang-tidy-in-ci.sh
torch/CMakeLists.txt
torch/csrc/jit/register_quantized_ops.cpp [new file with mode: 0644]