Repository navigation
feat: add opt-in memory-channel synchronization diagnostics - #946
Open
Ziming Wang (ZenAlexa) wants to merge 6 commits into
Open
Ziming Wang (ZenAlexa) wants to merge 6 commits into
Ziming Wang (ZenAlexa) wants to merge 6 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
/azp run |
|
Commenter does not have sufficient privileges for PR 946 in repo microsoft/mscclpp |
Contributor
Author
|
added the image's existing driver library path so the CPU runner can import the installed package, and the scenario still goes through the native wheel. could you approve the current CUDA 12.9 and 13.0 workflow runs? |
importing the DSL loads the native bindings, which link NVML through CUDA::nvml. the CPU runner image ships the toolkit stub but no driver NVML, so the scenario step links libnvidia-ml.so.1 to the stub for that one import.
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
This branch has not been deployed
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.
implements the first opt-in slice proposed in #942 for review.
CollectiveProgram.diagnose_synchronization()reports per-channel token mismatches and dependency cycles before a plan reaches serialization or execution. the API and its initial scope remain subject to maintainer review.behavior
#806 checks totals per rank pair and channel type. balanced totals can include a wait-before-signal cycle or signals and waits on different semaphore instances. both cases currently serialize successfully.
the diagnostic resolves each memory channel using the executor's per-peer occurrence pairing, matches signal and wait ordinals, and combines those dependencies with each thread block's authored order.
graphlib.TopologicalSorteridentifies a concrete cycle in linear time and space. the report contains a status, a message, and zero-based rank/thread-block/operation locations.acyclicmeans the balanced token graph is acyclic.mismatchidentifies the channel, counts, and first unmatched token.cycleincludes a closed dependency witness with channel and token details.unsupportedidentifies the boundary that prevents analysis.the call is read-only and optional. existing
to_json()checks, instruction order, fusion, synchronization insertion, replication, and runtime execution remain unchanged. this keeps diagnostics separate from the intra-rank ordering work in #627.scope
supports straight-line
Simpleplans with pairedMemoryChannelendpoints,SyncType.both, and one ordered producer and one ordered consumer thread block per directed semaphore. normal and relaxed operations have the same token dependencies. positive instance replication creates independent copies of the graph.the token model assumes fresh semaphore state or a previously balanced invocation, without counter overflow. device residency, transport progress, payload visibility, and data races require separate validation.
pipelines, packet operations, port/switch channels, cross-block barriers, intra-rank semaphores, thread-block groups, resource reuse, unpaired endpoints, shared producer/consumer blocks, nondefault signal/wait synchronization, and post-processed IR return
unsupported. their existing compilation behavior is preserved.validation
MSCCLPPProgramreference inallgather_ring.py, theput_packetcall inalltoall_pkt.py, and the signal/wait imbalance input_with_signal_fuse_test.py.bash tools/lint.sh py drypassed for all 147 tracked Python files.MSCCLPP_USE_IB=OFF. the standard isolated build included the native bindings and the default collective, NCCL, and expert-parallel extensions. fixed FetchContent sources and offline wheels supplied the build dependencies.site-packagesand ran the scenario entry point through that package. all 1,467 token-oracle comparisons and lifecycle boundaries passed. all 62 existing language scenarios also ran through the installed package, with 59 successes and the same three pre-existing failures listed above./azp runfrom an authorized account for the existing CUDA 12.9/13.0 workflow in the project's build image. GPU execution and collective throughput have not been measured.added the scenario entry point to the existing CUDA 12.9/13.0 DSL workflow after package installation.
current CI integration
f6d2346merges current main (f5643de9) and fixes the second import failure in the scenario step. at6a35910both CUDA 12.9 and 13.0 jobs built the wheel and got pastlibcuda.so.1through the image's/usr/local/cuda/compatdirectory, then failed loading the native bindings withlibnvidia-ml.so.1missing, because the build linksCUDA::nvmland the CPU runner has no driver NVML. the scenario step now linkslibnvidia-ml.so.1to the toolkit stub/usr/local/cuda/lib64/stubs/libnvidia-ml.soin a temp directory for that one command, and fails early if the stub is absent. the same images exposeLIBRARY_PATH=/usr/local/cuda/lib64/stubsandNV_NVML_DEV_VERSION, which is where the wheel build resolved NVML. actionlint passes. both lanes need to run on this revision to confirm the import and the scenarios.