|
1 | | -.PHONY: help build build-apiserver build-processor build-gc run-apiserver run-processor run-gc run-apiserver-dev run-processor-dev run-gc-dev build-release package-release publish-helm-chart generate-release test test-coverage test-coverage-func clean lint fmt vet tidy install-tools deps-get deps-verify bench check check-container-tool ci image-build image-build-apiserver image-build-processor image-build-gc test-regression test-integration test-all test-e2e test-helm dev-deploy dev-clean dev-rm-cluster pre-commit benchmark-local benchmark-local-teardown |
| 1 | +.PHONY: help build build-apiserver build-processor build-gc run-apiserver run-processor run-gc run-apiserver-dev run-processor-dev run-gc-dev build-release package-release publish-helm-chart generate-release test test-coverage test-coverage-func clean lint fmt vet tidy install-tools deps-get deps-verify bench check check-container-tool ci image-build image-build-apiserver image-build-processor image-build-gc test-regression test-integration test-all test-e2e test-helm dev-deploy dev-clean dev-rm-cluster pre-commit benchmark-local benchmark-local-teardown benchmark-gpu benchmark-gpu-teardown |
2 | 2 |
|
3 | 3 | SHELL := /usr/bin/env bash |
4 | 4 |
|
@@ -385,6 +385,72 @@ benchmark-local: |
385 | 385 | benchmark-local-teardown: |
386 | 386 | @KUBE_CONTEXT=$(BENCHMARK_CONTEXT) SCENARIO=$(BENCHMARK_SCENARIO) bash benchmarks/teardown.sh |
387 | 387 |
|
| 388 | +# GPU benchmark variables |
| 389 | +BENCHMARK_GPU_CONTEXT ?= $(BENCHMARK_CONTEXT) |
| 390 | +BENCHMARK_GPU_NAMESPACE ?= batch-bench-gpu |
| 391 | +BENCHMARK_GPU_SCENARIOS ?= 0 1 2 3 4 |
| 392 | +BENCHMARK_GPU_RESULTS_DIR ?= benchmarks/results/gpu-run |
| 393 | +BENCHMARK_GPU_MODEL ?= Qwen/Qwen3-8B |
| 394 | +BENCHMARK_GPU_BATCH_SIZE ?= 3000 |
| 395 | +BENCHMARK_GPU_NUM_JOBS ?= 3 |
| 396 | +BENCHMARK_GPU_BURST_RATE ?= 35 |
| 397 | +BENCHMARK_GPU_PROMPT_TOKENS ?= 256 |
| 398 | +BENCHMARK_GPU_CYCLES ?= 4 |
| 399 | +BENCHMARK_GPU_WARMUP ?= 2 |
| 400 | + |
| 401 | +## benchmark-gpu: Run benchmark e2e on a GPU cluster (single command, unified report) |
| 402 | +## Uses --managed mode: setup → benchmark → teardown per scenario in one process. |
| 403 | +## Required: BENCHMARK_GPU_CONTEXT (or BENCHMARK_CONTEXT) |
| 404 | +## Optional: ROUTER_REPO, PROMETHEUS_URL, BENCHMARK_GPU_SCENARIOS, BENCHMARK_GPU_NAMESPACE |
| 405 | +## |
| 406 | +## Example: |
| 407 | +## make benchmark-gpu BENCHMARK_GPU_CONTEXT=coreweave-waldorf BENCHMARK_GPU_NAMESPACE=my-ns |
| 408 | +## # With Prometheus already port-forwarded: |
| 409 | +## make benchmark-gpu BENCHMARK_GPU_CONTEXT=coreweave-waldorf PROMETHEUS_URL=http://localhost:9090 |
| 410 | +benchmark-gpu: |
| 411 | + @if [ -z "$(BENCHMARK_GPU_CONTEXT)" ]; then \ |
| 412 | + echo "ERROR: BENCHMARK_GPU_CONTEXT must be set (or set BENCHMARK_CONTEXT)"; exit 1; \ |
| 413 | + fi |
| 414 | + @echo "=== Benchmark GPU e2e (scenarios: $(BENCHMARK_GPU_SCENARIOS)) ===" |
| 415 | + @echo "Context: $(BENCHMARK_GPU_CONTEXT)" |
| 416 | + @echo "Namespace: $(BENCHMARK_GPU_NAMESPACE)" |
| 417 | + @echo "Model: $(BENCHMARK_GPU_MODEL)" |
| 418 | + @echo "Burst rate: $(BENCHMARK_GPU_BURST_RATE) req/s" |
| 419 | + @echo "Batch: $(BENCHMARK_GPU_NUM_JOBS) jobs x $(BENCHMARK_GPU_BATCH_SIZE) requests" |
| 420 | + @echo "Results: $(BENCHMARK_GPU_RESULTS_DIR)" |
| 421 | + @rm -rf $(BENCHMARK_GPU_RESULTS_DIR) |
| 422 | + python3 benchmarks/benchmark.py \ |
| 423 | + --managed \ |
| 424 | + --context $(BENCHMARK_GPU_CONTEXT) \ |
| 425 | + --namespace $(BENCHMARK_GPU_NAMESPACE) \ |
| 426 | + --scenarios $(BENCHMARK_GPU_SCENARIOS) \ |
| 427 | + --model $(BENCHMARK_GPU_MODEL) \ |
| 428 | + --batch-size $(BENCHMARK_GPU_BATCH_SIZE) \ |
| 429 | + --num-jobs $(BENCHMARK_GPU_NUM_JOBS) \ |
| 430 | + --burst-rate $(BENCHMARK_GPU_BURST_RATE) \ |
| 431 | + --prompt-tokens $(BENCHMARK_GPU_PROMPT_TOKENS) \ |
| 432 | + --cycles $(BENCHMARK_GPU_CYCLES) \ |
| 433 | + --warmup $(BENCHMARK_GPU_WARMUP) \ |
| 434 | + --results-dir $(BENCHMARK_GPU_RESULTS_DIR) |
| 435 | + @echo "" |
| 436 | + @echo "=== GPU Benchmark complete ===" |
| 437 | + @echo "Report: $(BENCHMARK_GPU_RESULTS_DIR)/report.html" |
| 438 | + @echo "Results: $(BENCHMARK_GPU_RESULTS_DIR)/results.json" |
| 439 | + @echo "Run 'make benchmark-gpu-teardown' to delete the namespace." |
| 440 | + |
| 441 | +## benchmark-gpu-teardown: Teardown GPU benchmark resources (keeps namespace for RBAC preservation) |
| 442 | +benchmark-gpu-teardown: |
| 443 | + @KEEP_NAMESPACE=1 KUBE_CONTEXT=$(BENCHMARK_GPU_CONTEXT) SCENARIO=$(BENCHMARK_SCENARIO) NAMESPACE=$(BENCHMARK_GPU_NAMESPACE) bash benchmarks/teardown.sh |
| 444 | + |
| 445 | +## benchmark-gpu-teardown-full: Full teardown including namespace deletion (RBAC will need ArgoCD re-sync) |
| 446 | +benchmark-gpu-teardown-full: |
| 447 | + @KUBE_CONTEXT=$(BENCHMARK_GPU_CONTEXT) SCENARIO=$(BENCHMARK_SCENARIO) NAMESPACE=$(BENCHMARK_GPU_NAMESPACE) bash benchmarks/teardown.sh |
| 448 | + |
| 449 | +# Prometheus defaults for GPU benchmarks |
| 450 | +PROMETHEUS_NAMESPACE ?= llm-d-monitoring |
| 451 | +PROMETHEUS_SERVICE ?= llmd-kube-prometheus-stack-prometheus |
| 452 | +PROMETHEUS_RELEASE ?= llmd-kube-prometheus-stack |
| 453 | + |
388 | 454 | ## test-e2e: Run E2E tests against a live API server (requires TEST_BASE_URL or dev-deploy NodePort services) |
389 | 455 | ## Use TEST_RUN to filter tests, e.g.: make test-e2e TEST_RUN=TestE2E/Batches/Cancel/InProgress |
390 | 456 | test-e2e: |
|
0 commit comments