Torch cannot detect Intel XPU device

When I am using pytorch running a deep learning program through the integrated Intel Arc Graphics in Ultra 5-125H CPU, the XPU device cannot be detected. Why and how to solve?

you installed cpu version.
see Getting Started on Intel GPU — PyTorch 2.10 documentation for installing for xpu