From 52f92b13c6954b55576d9dfe14c7b9a2aec4925f Mon Sep 17 00:00:00 2001 From: CSY Date: Wed, 8 Jan 2025 08:27:32 +0000 Subject: [PATCH] [CI] test xpu device --- tests/xpu.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/xpu.py diff --git a/tests/xpu.py b/tests/xpu.py new file mode 100644 index 0000000..2fa1050 --- /dev/null +++ b/tests/xpu.py @@ -0,0 +1,15 @@ +from device_smi import Device + +dev = Device("xpu") +print(dev) + +assert dev.type == "xpu", f"wrong type: {dev.type}" +if dev.pcie: + assert dev.pcie.gen is not None + assert dev.pcie.speed is not None + assert dev.pcie.id is not None +if dev.gpu: + assert dev.gpu.driver is not None + assert dev.gpu.firmware is not None +assert dev.model +assert dev.memory_total > 10, f"wrong memory size: {dev.memory_total()}"