Skip to content

Commit 15ad8e0

Browse files
committed
Fix CI
1 parent 7d4d837 commit 15ad8e0

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

.github/workflows/third-party-benchmarks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ jobs:
111111
- name: Install SGLANG
112112
run: |
113113
git clone https://github.com/sgl-project/sglang.git
114-
cd sglang/python
115-
pip install .
114+
pip install sglang/python[srt_xpu]
116115
117116
- name: Run SGLANG attention prefill stage benchmark
118117
if: ${{ steps.install.outcome == 'success' && !cancelled() && !contains(fromJson(inputs.skip_benchmarks || '[]'), 'prefill_attention_benchmark.py') }}

benchmarks/third_party/sglang/decode_attention_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def benchmark(B, SEQ_LENS, H_Q, H_KV, D, MODE, VALIDATE, provider):
105105
else:
106106
raise NotImplementedError(f'Unsupported provider {provider}')
107107

108-
tflops = lambda ms: 2 * B * (H_Q + H_KV * N_CTX) * N_CTX * D * (1e-12) / (ms * 1e-3)
108+
tflops = lambda ms: (2 * B * (H_Q + H_KV) * N_CTX * N_CTX * D + 3 * B * H_Q * N_CTX * N_CTX) * (1e-12) / (ms * 1e-3)
109109
gbps = lambda ms: 2 * B * (H_Q + H_KV * N_CTX) * D * 2 * (1e-9) / (ms * 1e-3)
110110

111111
return (gbps(mean), gbps(max_ms), gbps(min_ms)), (tflops(mean), tflops(max_ms), tflops(min_ms)), cv

benchmarks/third_party/sglang/extended_attention_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def refer_fn():
127127
else:
128128
raise NotImplementedError(f'Unsupported provider {provider}')
129129

130-
tflops = lambda ms: 2 * B * (H_Q + H_KV * N_CTX) * N_CTX * D * (1e-12) / (ms * 1e-3)
130+
tflops = lambda ms: (2 * B * (H_Q + H_KV) * N_CTX * N_CTX * D + 3 * B * H_Q * N_CTX * N_CTX) * (1e-12) / (ms * 1e-3)
131131
gbps = lambda ms: 2 * B * (H_Q + H_KV * N_CTX) * D * 2 * (1e-9) / (ms * 1e-3)
132132

133133
return (gbps(mean), gbps(max_ms), gbps(min_ms)), (tflops(mean), tflops(max_ms), tflops(min_ms)), cv

benchmarks/third_party/sglang/prefill_attention_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def benchmark(B, SEQ_LENS, H_Q, H_KV, D, CAUSAL, MODE, VALIDATE, provider):
8888
else:
8989
raise NotImplementedError(f'Unsupported provider {provider}')
9090

91-
tflops = lambda ms: 2 * B * (H_Q + H_KV) * N_CTX * N_CTX * D * (1e-12) / (ms * 1e-3)
91+
tflops = lambda ms: (2 * B * (H_Q + H_KV) * N_CTX * N_CTX * D + 3 * B * H_Q * N_CTX * N_CTX) * (1e-12) / (ms * 1e-3)
9292
gbps = lambda ms: 2 * B * (H_Q + H_KV) * N_CTX * D * 2 * (1e-9) / (ms * 1e-3)
9393

9494
return (gbps(mean_ms), gbps(max_ms), gbps(min_ms)), (tflops(mean_ms), tflops(max_ms), tflops(min_ms)), cv

0 commit comments

Comments
 (0)