Move var and std overloads to Functions.cpp and remove native:: reference (#48683)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48683
I want to delete NativeFunctions.h from Functions.h header. To do this I must remove all references to native:: However; I also must avoid trampling over iseeyuan's work of making ATen compilable without reference to ATen_cpu. In this particular case, I fix the Functions.h problem by moving it to a cpp file, and removing the native:: short-circuit (ostensibly there for performances). This also fixes a hypothetical correctness bug where these would not dispatch properly if the underlying functions no longer uniformly used a single native:: implementation.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Reviewed By: bhosmer
Differential Revision: D25261843
Pulled By: ezyang
fbshipit-source-id: 05ca6555fbf1062f9b22d868c8cb88fdf8e4c24b