Mengwei Liu
Mengwei Liu
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D42729435).
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D42729435).
LOL one thing lead to another this becomes a huge PR. I'll rely on CI jobs to make sure this is ok in OSS.
@pytorchbot merge
This breaks a few unit tests, because they were expecting a graph break before but now they don't. For example: ```python def ref_take(src, idx): if dtype == torch.bfloat16: src =...
> @thomasjpfan did some experiments with this PR and the compat layer, and it seems like there are still quite a few things that should be sorted. See [this notebook](https://gist.github.com/thomasjpfan/513115f8c6265b83c9fe69ec9f02f11a)....
> Note that that notebook shows how `np.mean(X, 1)` fails on this PR as it seems to try to trace through NumPy rather than PyTorch. I think this PR should...
Added unit test for `np.mean`
> This seems nearly ready to go, just need to resolve the TensorVariable subclassing situation. What might be the right thing to do is have NumpyNdarrayVariable CONTAIN a TensorVariable, which...