Introduce LegacyTHDispatcher for dispatching to TH functions. (#14708)
authorGregory Chanan <gchanan@fb.com>
Tue, 4 Dec 2018 15:39:09 +0000 (07:39 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 4 Dec 2018 15:41:04 +0000 (07:41 -0800)
commit264111bfc1de6103594c1a4f28bfc5e49aa71d88
tree270b2e31c446c1c778bccfa844db1d6c96558823
parent33b1f9f71a3d5eec2b2bde694aa77526175fafd0
Introduce LegacyTHDispatcher for dispatching to TH functions. (#14708)

Summary:
This isn't hooked up to anything yet, this is just putting the skeleton in place.
The idea here is that the functions generated via Declarations.cwrap and nn.yaml are not actually operators, they are implementation details of operators, and thus don't need to participate in VariableType, JIT dispatch generation.

So, we will split these functions out from the usual Type/operator hierarchy; for now the dispatch will be done by a Type-like class called LegacyTHDispatcher.  Once this is done this probably means we can collapse Type to be backend-specific, not Type/ScalarType specific, because all the ScalarType specific code will live in the LegacyTHDispatcher.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14708

Reviewed By: ezyang

Differential Revision: D13304654

Pulled By: gchanan

fbshipit-source-id: cfe3e1a28adcc355f67fe143495ee7e5c5118606
aten/src/ATen/Context.cpp
aten/src/ATen/Context.h
aten/src/ATen/LegacyTHDispatch.cpp [new file with mode: 0644]
aten/src/ATen/LegacyTHDispatch.h [new file with mode: 0644]
aten/src/ATen/gen.py
aten/src/ATen/templates/LegacyTHDispatcher.h [new file with mode: 0644]