Introduce LegacyTHDispatcher for dispatching to TH functions. (#14754)
authorGregory Chanan <gchanan@fb.com>
Tue, 4 Dec 2018 22:41:03 +0000 (14:41 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 4 Dec 2018 22:44:06 +0000 (14:44 -0800)
commit9e1f4ba1244c196d3e1d94c3142c17c4906fdda5
treedd67991c538429e5c1c313ca610086c8eaa542fb
parent53a9d4f3121f634d92336ea7d26122fccc7c1418
Introduce LegacyTHDispatcher for dispatching to TH functions. (#14754)

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

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.

Reviewed By: ezyang

Differential Revision: D13321605

fbshipit-source-id: 25d1bbc9827a42d6ab5d69aabbad3eac72bf364c
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]