Compute Tensor::toString() without reference to backend (#54711)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54711
Just print the dispatch key directly. The format here doesn't really
make sense but you'll still get something like CPUFloatTensor (because
the dispatch key is just CPU).
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Reviewed By: bdhirsh
Differential Revision: D27338811
Pulled By: ezyang
fbshipit-source-id: f459c5f7c006c06df4913ab33697eae89c46d83f