Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/anomalib/engine/accelerator/xpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
class XPUAccelerator(Accelerator):
"""Support for a XPU, optimized for large-scale machine learning."""

accelerator_name = "xpu"
@property
def name(self) -> str:
"""Setting the name of the accelerator which is required for accelerators by pytorch-lightning >= 2.5.6."""
return "xpu"

@staticmethod
def setup_device(device: torch.device) -> None:
Expand Down Expand Up @@ -59,7 +62,7 @@ def teardown(self) -> None:


AcceleratorRegistry.register(
XPUAccelerator.accelerator_name,
XPUAccelerator().name,
XPUAccelerator,
description="Accelerator supports XPU devices",
)
Loading