Skip to content

Commit b25a2ec

Browse files
committed
Passing GPU_DEVICE to upload script
1 parent 36c1c33 commit b25a2ec

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

vllm-benchmarks/run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ run_benchmark() {
6969
upload_results() {
7070
if [[ "${UPLOAD_BENCHMARK_RESULTS:-1}" == "1" ]]; then
7171
# Upload the benchmark results
72-
python upload_benchmark_results.py --vllm vllm --benchmark-results vllm/benchmarks/results
72+
python upload_benchmark_results.py \
73+
--vllm vllm \
74+
--benchmark-results vllm/benchmarks/results \
75+
--device "${GPU_DEVICE}"
7376

7477
pushd vllm
7578
if [[ -f benchmarks/results/benchmark_results.md ]]; then

vllm-benchmarks/upload_benchmark_results.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ def parse_args() -> Any:
6161
default="ossci-benchmarks",
6262
help="the S3 bucket to upload the benchmark results",
6363
)
64+
parser.add_argument(
65+
"--device",
66+
type=str,
67+
required=True,
68+
help="the name of the GPU device coming from nvidia-smi or amd-smi",
69+
)
6470
parser.add_argument(
6571
"--dry-run",
6672
action="store_true",
@@ -155,9 +161,10 @@ def upload_to_s3(
155161
head_branch: str,
156162
head_sha: str,
157163
aggregated_results: List[Dict[str, Any]],
164+
device: str,
158165
dry_run: bool = True,
159166
) -> None:
160-
s3_path = f"v3/{REPO}/{head_branch}/{head_sha}/benchmark_results.json"
167+
s3_path = f"v3/{REPO}/{head_branch}/{head_sha}/{device}/benchmark_results.json"
161168
info(f"Upload benchmark results to s3://{s3_bucket}/{s3_path}")
162169
if not dry_run:
163170
# Write in JSONEachRow format
@@ -184,7 +191,12 @@ def main() -> None:
184191
# Extract and aggregate the benchmark results
185192
aggregated_results = aggregate(metadata, runner, load(args.benchmark_results))
186193
upload_to_s3(
187-
args.s3_bucket, head_branch, head_sha, aggregated_results, args.dry_run
194+
args.s3_bucket,
195+
head_branch,
196+
head_sha,
197+
aggregated_results,
198+
args.device,
199+
args.dry_run,
188200
)
189201

190202

0 commit comments

Comments
 (0)