Skip to content

Commit

Permalink
[CI] test xpu device
Browse files Browse the repository at this point in the history
  • Loading branch information
CSY-ModelCloud committed Jan 8, 2025
1 parent f03ebee commit 52f92b1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/xpu.py
Original file line number Diff line number Diff line change
@@ -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()}"

0 comments on commit 52f92b1

Please sign in to comment.