We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1e9808 commit ca4e857Copy full SHA for ca4e857
third_party/intel/backend/driver.py
@@ -308,11 +308,11 @@ def __init__(self):
308
self.get_device_properties = self.mod.get_device_properties
309
self.context = self.mod.init_context(self.get_sycl_queue())
310
self.device_count = self.mod.init_devices(self.get_sycl_queue())
311
- self.current_device = 0 if self.device_count[0] > 0 else -1
312
self.wait_on_sycl_queue = self.mod.wait_on_sycl_queue
313
314
def get_current_device(self):
315
- return self.current_device
+ import torch
+ return torch.xpu.current_device()
316
317
def get_sycl_queue(self):
318
import torch
0 commit comments