WIP feat(cpu-power): Rust ACPI/DCGM exporter with Python fallback for AIPerf server-metrics - #381
Closed
ajcasagrande wants to merge 8 commits into
Closed
ajcasagrande wants to merge 8 commits into
ajcasagrande wants to merge 8 commits into
Conversation
Ships the statically-linked Rust binary (aarch64/x86_64 musl) that reads /sys/class/hwmon hwmon*/power*_average and serves cpu_power_acpi_watts on :9405/metrics for AIPerf --server-metrics scraping. Covers: - src/cpu-power-exporter/ Rust crate (tokio, tracing, clap, anyhow) - Workspace member added to Cargo.toml - docker/Dockerfile.cpu-power-exporter (musl static, two-arch) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
…r-exporter - Makefile: cpu-power-exporter / cpu-power-exporter-download targets, CPU_POWER_EXPORTER_RELEASE var, setup now depends on both downloads - release.yaml: unified change detection (single step, two outputs), build-cpu-power-exporter job (linux/amd64 + linux/arm64), graceful carry-forward for both binaries from the previous release, nullglob-safe gh release create Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
…metrics - telemetry_stage: add _resolve_bundled_binary (generalized from _resolve_tachometer_binary), add _start_cpu_power_prometheus_exporters which launches bin/cpu-power-exporter via srun on each worker node, call it from start_cpu_power_telemetry when prometheus_port > 0, fix dcgm_exporter guard (return None instead of raise when None) - benchmark_stage: inject cpu-power-exporter node URLs into AIPERF_SERVER_METRICS_URLS when cpu_power.prometheus_port > 0 - submit.py: validate_setup checks bin/cpu-power-exporter alongside tachometer - schema.py: add CpuPowerConfig.prometheus_port (default 9405), gate _validate_dcgm_power on dcgm_exporter is not None Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
Uses trace-replay benchmark type so AIPerf actually consumes the AIPERF_SERVER_METRICS_URLS endpoints. Qwen3.5-27B BF16 to avoid the 8-minute FP4 JIT autotuning pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
…power Ports cpu_power_exporter.py from kylliang/power_study_20260901 (commit 2a13cb1). Default port updated to 9405 (consistent with the rest of the cpu-power stack). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
…orter is absent If the bundled Rust binary is not present or not executable (e.g. x86_64 nodes or a checkout without a pre-built bin/), _start_cpu_power_prometheus_exporters now falls back to `python3 -m srtctl.core.cpu_power_exporter` so Prometheus scraping still works everywhere. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
ajcasagrande
requested review from
alec-flowers,
csahithi,
ishandhanani and
nlevin-ui
as code owners
September 3, 2026 19:40
4 tasks
…etup, and tests from ajc/rust-cpu-exporter - Add url_host() to ip_utils for IPv6 URL bracket safety - Use url_host() in benchmark_stage.py CPU power URL construction - Add arch_from_binary() to dynamo_wheels.py - Rewrite CpuPowerConfig: drop 'dcgm' source, add storage_subdir, acpi_mandatory - Add _dynamo_system_ports(), _validate_collector_budget(), _validate_cpu_power(), _reject_inert_cpu_power_demand() to schema validation - Rewrite _validate_telemetry() to support CPU-only, DCGM-only, or combined modes - Fix _validate_observability() to not conflict CPU-only telemetry with Tachometer DCGM - Improve telemetry_stage.py: drop permitted_device_keys, use cpu_power.storage_subdir - Update Makefile: version marker, arch check, warn-on-failure for latest release - Add cpu-power-exporter-setup target; switch setup to use it - Update validate_setup() to conditionally require cpu-power-exporter - Add _cpu_power_exporter_problem() with executability and arch mismatch detection - Port IPv6 tachometer tests and cpu-only telemetry stage test from rust-cpu-exporter - Port validate_setup tests: disabled/enabled/arch-mismatch/non-executable cases Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
Mirrors tachometer.yaml: runs cargo fmt/test on source changes, and a two-arch Docker cross-compile to validate the release Dockerfile. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
ajcasagrande
marked this pull request as draft
September 3, 2026 21:01
Closed
Collaborator
|
@ajcasagrande -- I ended up cherry-picking these into #410 and it just merged. I'll close this as we can pick up work on main to improve/fix bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Grafts the Rust
cpu-power-exporterbinary onto Kyle's CPU power branch, with the original Python exporter retained as a fallback.cpu_power.py,cpu_power_session.py,gpu_power_limit.py) are preserved — they ownsamples.csv/manifest.jsonartifact collectiontelemetry_stage.pytries the Rust binary first, falls back to Python moduleTest plan
/metricson aarch64 GB200 nodesAIPERF_SERVER_METRICS_URLSpopulated and scraped during benchmarksamples.csv/manifest.jsonartifacts still written correctlytest_cpu_power.pyandtest_gpu_power_limit.pypass🤖 Generated with Claude Code