Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support lazy initialization for empty_xpu (#1115)
# Motivation Fix pytorch/pytorch#140877 Some PyTorch C++ users could call empty op directly. In this situation, lazy initialization would not have been triggered. So we have to add `lazyInitDevice` here, which also aligns with CUDA [convention](https://github.com/pytorch/pytorch/blob/150ffb6e07f3802f8d0d3e843486e77a872803cf/aten/src/ATen/cuda/EmptyTensor.cpp#L13).
- Loading branch information