You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #45. Steps 1 and 2 of the plan landed in commits 0e4f087 (proto fields + serializer)
and 05e5f80 (DeviceMeasurementService skeleton).
This issue tracks the remaining work from the #45 fix plan:
Step 3 — Device-side probe handlers
Add 3 new MessageType enum values + extension registrations in proto/global_api.proto for OP_PROBE_LAT, OP_PROBE_BW, OP_PROBE_GEMM (request/response pairs).
csrc/backend/proxy_cli.cpp: register handlers that echo the probe payload (M1), echo the buffer (M2), and run the seeded challenge GEMM (M3) via the existing CUDA path.
Loopback integration test under tests/cpp/integration/ running server + client in the same process, asserting measured values are within ±30% of synthetic ground truth.
Step 4 — Server-side wiring
In ProxySvrHandle::HandleRegisterResponse, after DEVICE_TRACKER.RegisterDevice, call DeviceMeasurementService (sequence M1 → M2 → M3, each flag-gated).
Add DeviceTracker::UpdateMeasuredProfile(device_id, measured) so the tracked struct carries the measured fields back to schedulers.
Step 5 — Config knob loading
Already partially landed via the env-var path on DeviceMeasurementService. Add a Python parse test under tests/python/unit/common/ reading the same env vars to assert defaults remain off.
Step 6 — Source-level marker
run_device.py:98 keeps FIXME(#45); convert to a docstring/NOTE once measurement is observable end-to-end.
Step 7 — Docs
Extend docs/deployment.md with a "Server-measured device profile" subsection (3 enable flags, accuracy expectations, reconciliation deferral).
Step 8 — Final E2E
docker run … python3 scripts/run_devices.py --measurement on produces a server log line per device of the form Device <uuid>: reported flops=<X>, measured=<Y>, verified=<bool>.
Reconciliation policy (separate, not in scope here)
Should flops consumed by schedulers be min(reported, measured), measured, or weighted? Open a dedicated issue once measured data is flowing.
Plan reference: .omo/plans/issue-45-fix.md (Momus-approved).
verified=1 confirms the FLOPS challenge round-tripped through the real device-side cuBLAS/MKL worker and matched the OpenBLAS reference within flops_tolerance.
C++ tests: all green incl. test_device_measurement_session 5/5, test_device_measurement_service 3/3, test_device_profile_roundtrip 3/3
Skipped, with rationale:
Step 3d (real-socket loopback integration gtest): the 3c UT locks the contract with 5 cases (happy path, M3 mismatch, timeout, stale probe ID, empty config); 3d was optional in the plan and not a gate for closing. Worth filing a follow-up if production-driver coverage becomes desired.
Explicitly out of scope (deferred):
Reconciliation policy (min(reported,measured) vs measured vs blend) — tracked separately.
Pre-existing infrastructure gotchas surfaced during step 8 (not #55 bugs, tracked as follow-up issues):
The Dockerfile step cmake --build tests/cpp/build -j only builds a subset of test targets; zerocopy tests end up under tests/cpp/build/unit/zerocopy/ and are NOT scanned by tests/run_cpp_tests.sh. Fix: either configure CMAKE_RUNTIME_OUTPUT_DIRECTORY to consolidate binaries, or update the run script to find -name 'test_*' -executable.
The bandwidth probe defaults to 4 MiB which exceeds the default container memlock budget; --ulimit memlock=-1 on docker run is now documented in deployment.md but should arguably be in the base image's recommended run command.
python3 -u + stdbuf -oL are required to surface the server's INFO completion log line before idle (Python's block-buffered stdout otherwise swallows C++ writes); documented in deployment.md.
Activity
drunkcoding commentedon May 31, 2026
Closed by the full commit chain:
E2E result (commit 7077777):
emits the canonical completion line per device:
verified=1confirms the FLOPS challenge round-tripped through the real device-side cuBLAS/MKL worker and matched the OpenBLAS reference withinflops_tolerance.Verification gates:
docker buildexits 0pytest tests -v: 112 passed / 10 skipped (109 pre-Device measurement: probe wire protocol + server coordinator (#45 steps 3-8) #55 baseline + 3 new fromtests/python/unit/test_measurement_flags.py)test_device_measurement_session5/5,test_device_measurement_service3/3,test_device_profile_roundtrip3/3Skipped, with rationale:
Explicitly out of scope (deferred):
min(reported,measured)vsmeasuredvs blend) — tracked separately.Pre-existing infrastructure gotchas surfaced during step 8 (not #55 bugs, tracked as follow-up issues):
Dockerfilestepcmake --build tests/cpp/build -jonly builds a subset of test targets; zerocopy tests end up undertests/cpp/build/unit/zerocopy/and are NOT scanned bytests/run_cpp_tests.sh. Fix: either configureCMAKE_RUNTIME_OUTPUT_DIRECTORYto consolidate binaries, or update the run script tofind -name 'test_*' -executable.--ulimit memlock=-1ondocker runis now documented in deployment.md but should arguably be in the base image's recommended run command.python3 -u+stdbuf -oLare required to surface the server's INFO completion log line before idle (Python's block-buffered stdout otherwise swallows C++ writes); documented in deployment.md.feat(proto): add probe wire messages for device measurement (#55 step…
docs(device): replace FIXME(#45) with trust-model NOTE block (#55 ste…
feat(backend): add ProbeMessageCodec + device-side probe handlers (#55 …
feat(backend): add DeviceMeasurementSession state machine (#55 step 3c)
feat(backend): wire DeviceMeasurementSession into proxy_svr (#55 step 4)
feat(config): INI-driven device measurement knobs (#55 step 5 + 5b)
docs(deployment): document server-measured device profile (#55 step 7)
feat(scripts): add --measurement shim to run_devices.py (#55 step 8)
fix(tests): run_cpp_tests.sh now discovers nested binaries (#58)
docs,infra: consistent --ulimit memlock=-1 on docker run (#59)
feat(device-tracker): log policy-neutral measured-vs-reported profile…
feat(proto): add probe wire messages for device measurement (#55 step…
docs(device): replace FIXME(#45) with trust-model NOTE block (#55 ste…
feat(backend): add ProbeMessageCodec + device-side probe handlers (#55 …
feat(backend): add DeviceMeasurementSession state machine (#55 step 3c)
feat(backend): wire DeviceMeasurementSession into proxy_svr (#55 step 4)
feat(config): INI-driven device measurement knobs (#55 step 5 + 5b)
docs(deployment): document server-measured device profile (#55 step 7)
feat(scripts): add --measurement shim to run_devices.py (#55 step 8)
fix(tests): run_cpp_tests.sh now discovers nested binaries (#58)
docs,infra: consistent --ulimit memlock=-1 on docker run (#59)
feat(device-tracker): log policy-neutral measured-vs-reported profile…