Open daisyden opened 1 month ago
SYCL runtime issue.
As latest SYCL spec, we are recommended to use info::kernel_device_specific::work_group_size
instead of info::device::max_work_group_size
. But there is a new issue found. Cannot launch kernel successfully on PVC Tile 1 after querying info::kernel_device_specific::work_group_size
. Got runtime error.
duplicated with https://github.com/intel/torch-xpu-ops/issues/339
The issue is common for all platform where there are devices more than one. The most important and most common case for us is client case, a client platform/desktop has an iGPU and an dGPU.
@fengyuan14 can we please apply the workaround available to fix this problem?
i.e. change
https://github.com/intel/torch-xpu-ops/blob/main/src/comm/DeviceProperties.h#L19C3-L20C79
auto kbundle = ::sycl::get_kernel_bundle<::sycl::bundle_state::executable>(ctx, {kid});
to
auto kbundle = ::sycl::get_kernel_bundle<::sycl::bundle_state::executable>(ctx, {dev}, {kid});
@daisyden @fengyuan14 Test results after applying fix:
(pt_src) [ddkalamk@pcl-pvc01 pytorch]$ cat test2.py
import torch
print("PyTorch version: ", torch.__version__)
a = torch.empty(3, device=torch.device('xpu:0'))
a.fill_(1.1)
b = a.to(device='xpu:1')
a.device
b.device
print(b.cpu())
print(b)
(pt_src) [ddkalamk@pcl-pvc01 pytorch]$ python -u test2.py
PyTorch version: 2.5.0a0+git8693322
tensor([1.1000, 1.1000, 1.1000])
tensor([1.1000, 1.1000, 1.1000], device='xpu:1')
Hi, @ddkalamk. We have got a PR for it on main branch. Recently, we are busy on PT2.5 release. Will land the PR ASAP. https://github.com/intel/torch-xpu-ops/pull/769
Sounds good, thanks.
🐛 Describe the bug
Report:
Versions
latest version