Skip to content

Commit bf9abf7

Browse files
authored
Remove XPUDriver class as unused from benchmark_driver.py (#3068)
Part of #2540 Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 1133103 commit bf9abf7

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

benchmarks/triton_kernels_benchmark/benchmark_driver.py

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import os
22

3-
from triton.backends.compiler import GPUTarget
4-
from triton.backends.driver import DriverBase
53
from triton._utils import parse_list_string
6-
from triton.backends.intel.driver import compile_module_from_src, COMPILATION_HELPER, XPUUtils, ty_to_cpp, serialize_args
7-
8-
import torch
4+
from triton.backends.intel.driver import compile_module_from_src, COMPILATION_HELPER, ty_to_cpp, serialize_args
95

106
# ------------------------
117
# Utils
@@ -310,33 +306,3 @@ def __call__(self, *args, **kwargs):
310306
if serialize_kernel_args:
311307
serialize_args(args, self.constants, self.signature)
312308
self.launch(*args, **kwargs)
313-
314-
315-
class XPUDriver(DriverBase):
316-
317-
def __init__(self):
318-
self.launcher_cls = XPULauncher
319-
320-
def __getattr__(self, name):
321-
# Lazily initialize utils to avoid unnecessary XPU runtime invocations.
322-
# See https://github.com/intel/intel-xpu-backend-for-triton/issues/624
323-
if name == "utils":
324-
self.utils = XPUUtils() # pylint: disable=attribute-defined-outside-init
325-
return self.utils
326-
raise AttributeError
327-
328-
def get_current_device(self):
329-
return self.utils.get_current_device()
330-
331-
def get_current_stream(self, device): # pylint: disable=unused-argument
332-
return torch.xpu.current_stream().sycl_queue
333-
334-
def get_current_target(self):
335-
device = self.get_current_device()
336-
dev_property = torch.xpu.get_device_capability(device)
337-
warp_size = 32
338-
return GPUTarget("xpu", dev_property, warp_size)
339-
340-
@staticmethod
341-
def is_active():
342-
return torch.xpu.is_available()

0 commit comments

Comments
 (0)