More scaffolding for LegacyTHDispatch. (#14852)
authorGregory Chanan <gchanan@fb.com>
Tue, 11 Dec 2018 03:51:27 +0000 (19:51 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 11 Dec 2018 03:57:01 +0000 (19:57 -0800)
commit962b82dd8176e207b820b6ea2b06af3c9f46090d
tree70d291b46661c0c051793dc2bc9756b5604a28d7
parente9cd7816819ea7af3f2236d9a1672d165c19f1f3
More scaffolding for LegacyTHDispatch. (#14852)

Summary:
1) at::functions are now also exposed in the at::legacy::th namespace and we move relevant calls over to use them (to avoid merge conflicts)
2) LegacyTHDispatch now handles device-type initialization
3) We generate derived LegacyTHDispatchers, e.g. THLegacyCPULongDispatcher, although they are currently empty.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14852

Reviewed By: ezyang

Differential Revision: D13360852

Pulled By: gchanan

fbshipit-source-id: af6705aeba3593ea5dba9bfc62890e5257bc81f8
18 files changed:
aten/src/ATen/LegacyTHDispatch.h
aten/src/ATen/gen.py
aten/src/ATen/native/BatchLinearAlgebra.cpp
aten/src/ATen/native/Indexing.cpp
aten/src/ATen/native/LegacyBridge.cpp
aten/src/ATen/native/LegacyDefinitions.cpp
aten/src/ATen/native/LegacyNNDefinitions.cpp
aten/src/ATen/native/LinearAlgebra.cpp
aten/src/ATen/native/ReduceOps.cpp
aten/src/ATen/native/TensorCompare.cpp
aten/src/ATen/native/TensorFactories.cpp
aten/src/ATen/native/TensorShape.cpp
aten/src/ATen/native/UnaryOps.cpp
aten/src/ATen/templates/LegacyTHDispatcher.cpp [new file with mode: 0644]
aten/src/ATen/templates/LegacyTHDispatcher.h
aten/src/ATen/templates/LegacyTHDispatcherDerived.cpp [new file with mode: 0644]
aten/src/ATen/templates/LegacyTHDispatcherDerived.h [new file with mode: 0644]
aten/src/ATen/templates/LegacyTHFunctions.h [new file with mode: 0644]