Skip to content

Commit ae15596

Browse files
committed
max_bps xpu initial2
1 parent 1d7520f commit ae15596

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

third_party/proton/proton/specs.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ def max_bps(device_type, arch, bus_width, memory_clock_rate):
6868
return amd_bps_by_arch[arch]
6969
else:
7070
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
71+
if arch == "Xe-HPC":
72+
multiplier = 2
73+
elif arch == "Xe2" or arch == "Xe-HPG":
74+
multiplier = 8
75+
else:
76+
raise ValueError(f"Unsupported architecture: {arch}")
77+
return multiplier * bus_width * memory_clock_rate * 1e3 / 8

0 commit comments

Comments
 (0)