From e72c2c1aeac2543cdea2db6eae41f0ad7d1f918c Mon Sep 17 00:00:00 2001 From: Qitong Li Date: Tue, 8 Sep 2026 12:40:38 +0800 Subject: [PATCH] Add MLU device utilities and test backend support --- tests/testing_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testing_utils.py b/tests/testing_utils.py index a22da6de08e5..2aef5d626da4 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -45,6 +45,7 @@ is_sdnq_available, is_timm_available, is_torch_available, + is_torch_mlu_available, is_torch_neuronx_available, is_torch_tpu_available, is_torch_version, @@ -102,6 +103,8 @@ else: if torch.cuda.is_available(): torch_device = "cuda" + elif is_torch_mlu_available() and hasattr(torch, "mlu") and torch.mlu.is_available(): + torch_device = "mlu" elif torch.xpu.is_available(): torch_device = "xpu" elif is_torch_neuronx_available() and hasattr(torch, "neuron") and torch.neuron.is_available():