Move variabletype functions around (#63330)
authorsoulitzer <soulitzer@gmail.com>
Thu, 26 Aug 2021 23:00:21 +0000 (16:00 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 26 Aug 2021 23:02:39 +0000 (16:02 -0700)
commit92a154aa29186afea961a6fe491721229543535f
tree89b48f9e0c1eafc352e35bc458084929aab797d2
parent49353e319cd6537509f75463f41ddf4ac70e3cb6
Move variabletype functions around (#63330)

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

 - This is in preparation for templated/boxed autograd-not-implemented fallback
 - Make sure VariableTypeUtils does not depend on generated code
 - Lift `isFwGradDefined` into `autograd/functions/utils.cpp` so it's available to mobile builds
 - Removes `using namespace at` from VariableTypeUtils, previously we needed this for Templated version, but now its not strictly necessary but still a good change to avoid name conflicts if this header is included elsewhere in the future.

Test Plan: Imported from OSS

Reviewed By: heitorschueroff

Differential Revision: D30518573

Pulled By: soulitzer

fbshipit-source-id: a0fb904baafc9713de609fffec4b813f6cfcc000
tools/autograd/templates/VariableType.cpp
torch/csrc/autograd/FunctionsManual.cpp
torch/csrc/autograd/FunctionsManual.h
torch/csrc/autograd/VariableTypeManual.cpp
torch/csrc/autograd/VariableTypeUtils.h
torch/csrc/autograd/functions/utils.h