Replace some tensor.device().is_cpu() calls with direct tensor.is_cpu() (#54397)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54397
I was supposed to have done this in https://github.com/pytorch/pytorch/pull/54079
but apparently I forgot to push these changes before landing, so here's
the clean up.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Reviewed By: ailzhang
Differential Revision: D27235382
Pulled By: ezyang
fbshipit-source-id: ffcce5abc78251c81c230992bac70b8973906ace