Skip to content

Commit edc41ea

Browse files
authored
[Proton] Make sure max_bps doesn't crash a viewer (#5551)
Relates to #5550 Signed-off-by: Anatoly Myachev <[email protected]>
1 parent cda9b48 commit edc41ea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

third_party/proton/proton/specs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ def max_bps(device_type, arch, bus_width, memory_clock_rate):
6464
"""
6565
if device_type == "CUDA":
6666
return 2 * bus_width * memory_clock_rate * 1e3 / 8
67-
else:
68-
assert device_type == "HIP"
67+
elif device_type == "HIP":
6968
return amd_bps_by_arch[arch]
69+
else:
70+
assert device_type == "XPU"
71+
# FIXME: how to get correctly numbers on XPU?
72+
# https://github.com/intel/intel-xpu-backend-for-triton/issues/5550
73+
return 2 * bus_width * memory_clock_rate * 1e3 / 8

0 commit comments

Comments
 (0)