Repository: pytorch
Issue: [Break XPU] device type in  test_aot_inductor.py is not passed correctly to cpp_builder.
Labels: triaged,module: xpu

### 🐛 Describe the bug

#### Description
Currently XPU Ci is broken by the newly added test case `AOTInductorTestABICompatibleGpu.test_assert_tensor_meta_xpu`
The CI log: https://github.com/pytorch/pytorch/actions/runs/12869396818/job/35880652376
Error msg:
```
=================================== FAILURES ===================================
_________ AOTInductorTestABICompatibleGpu.test_assert_tensor_meta_xpu __________
Traceback (most recent call last):
  File "/var/lib/jenkins/pytorch/test/inductor/test_torchinductor.py", line 12376, in new_test
    return value(self)
  File "/var/lib/jenkins/pytorch/test/inductor/test_aot_inductor.py", line 4252, in test_assert_tensor_meta
    self.check_model(
  File "/var/lib/jenkins/pytorch/test/inductor/test_aot_inductor_utils.py", line 185, in check_model
    actual = AOTIRunnerUtil.run(
  File "/var/lib/jenkins/pytorch/test/inductor/test_aot_inductor_utils.py", line 137, in run
    optimized = AOTIRunnerUtil.load(device, so_path)
  File "/var/lib/jenkins/pytorch/test/inductor/test_aot_inductor_utils.py", line 119, in load
    return torch._export.aot_load(so_path, device)
  File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/_export/__init__.py", line 167, in aot_load
    runner = torch._C._aoti.AOTIModelContainerRunnerXpu(so_path, 1, device)  # type: ignore[assignment, call-arg]
RuntimeError: create_func_( &container_handle_, num_models, device_str.c_str(), cubin_dir.empty() ? nullptr : cubin_dir.c_str()) API call failed at /var/lib/jenkins/workspace/torch/csrc/inductor/aoti_runner/model_container_runner.cpp, line 81

To execute this test, run the following from the base repo dir:
    python test/inductor/test_aot_inductor.py AOTInductorTestABICompatibleGpu.test_assert_tensor_meta_xpu

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
```

#### The root cause analysis:
 The case raised runtime error at:
https://github.com/pytorch/pytorch/blob/00ffeca1b1fe753571412778996fe78deef49059/torch/csrc/inductor/aoti_runtime/model.h#L104-L109

here it should go to the USE_XPU part but actually not. Because the model for `toch.compile` is not set to XPU.
The model in newly added test case:
https://github.com/pytorch/pytorch/blob/00ffeca1b1fe753571412778996fe78deef49059/test/inductor/test_aot_inductor.py#L4237-L4257

In the `check_model`, it only set the model to `xpu`, and input tensors are not converted to `xpu`. Since there is no model internal tensor, `torch.compile` can not find any `xpu` tensor , so it's still a cpu model. 

Except for set the model to device, We should also set the input tensors to corresponding device too.  

### Versions

PyTorch version: 2.7.0a0+git225a10f
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.31.2
Libc version: glibc-2.35

Python version: 3.10.15 | packaged by conda-forge | (main, Oct 16 2024, 01:24:24) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-5.15.47+prerelease24.6.13-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True



cc @gujinghui @EikanWang @fengyuan14 @guangyey