Repository navigation
UCS/TOPO: Fix off-by-one error in max device id check - #11834
Conversation
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
8c562db to
810f53b
Compare
|
🤖 Starting review — findings will be posted here when done. |
|
No blocking issues. Boundary regression-test gap (registering up to num_devices == UCS_SYS_DEVICE_ID_COUNT to prove id 255 is never handed out and stays distinct from UCS_SYS_DEVICE_ID_UNKNOWN) remains a reasonable nice-to-have but is low risk given the ucs_assert_always(num_devices < UCS_SYS_DEVICE_ID_COUNT) guard. This duplicates an existing unresolved comment rather than warranting a new thread. |
|
🤖 CI Triage Agent — TL;DR: The ASan/roce gtest job died while Full analysisSummary: Job "AddressSanitizer roce on worker 0" (build 132669) was cancelled ("The agent has received a shutdown signal" / "The operation was canceled") while shard 1/4 of the gtest run was stuck in Root cause: Log timeline shows the test started at The PR head commit Implicated commit: Not the PR commit ( File: test/gtest/ucp/test_ucp_fault_tolerance.cc:382 ( Suggested fix:
Related: PR #11834 (this PR, UCS/TOPO off-by-one); FT-area PRs #11563, #11562, #11810; no existing issue found for this specific hang — worth opening one.
|
What?
Fix off-by-one error that could potentially assign a device with id
UCS_SYS_DEVICE_ID_UNKNOWN.Why?
Previously
UCS_TOPO_MAX_SYS_DEVICESwas set to256which also included the special value ofUCS_SYS_DEVICE_ID_UNKNOWN.This means that a real device could be allocated an id that is equal to
UCS_SYS_DEVICE_ID_UNKNOWN.The correct value is
255, but instead of just changing the value I made the macros depend on each other so it would be more robust.