Add device check before accessing data_ptr in PackLayer (#26056)
Summary:
fixes https://github.com/pytorch/xla/issues/927
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26056
Differential Revision: D17331859
Pulled By: ailzhang
fbshipit-source-id: bdc334f03c8dcbb4ef4f5e059a63ef188a0b8b61