-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Chakra Converter Handling of NCCL All-to-All, Logging Consistency, and HTA Dependency Issues #160
Open
JoongunPark
wants to merge
9
commits into
mlcommons:main
Choose a base branch
from
JoongunPark:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
JoongunPark
force-pushed
the
main
branch
2 times, most recently
from
October 14, 2024 18:57
d50a6c0
to
2833ef8
Compare
JoongunPark
force-pushed
the
main
branch
3 times, most recently
from
November 16, 2024 04:33
cf42d25
to
474b99f
Compare
JoongunPark
force-pushed
the
main
branch
3 times, most recently
from
December 1, 2024 21:36
cbcce6a
to
aee556b
Compare
JoongunPark
force-pushed
the
main
branch
2 times, most recently
from
December 2, 2024 06:00
d1a331b
to
640de25
Compare
Hi @srinivas212 and @tushar-krishna . |
Hi, this PR should be refined with recently accpeted PR (#145) and I am working on it. |
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
This PR addresses multiple issues in the Chakra converter:
1. Improper Handling of NCCL All-to-All Communication
Chakra incorrectly distinguishes between point-to-point and collective communication. In NCCL, all-to-all is implemented as point-to-point communication, but Chakra's current logic treats these as distinct, leading to an incorrect type for
PyTorchNode
. More details on NCCL point-to-point can be found here.2. Logging Inconsistency
There was a mismatch in logging levels: sync dependencies log via
logging.info
, while other dependencies uselogging.debug
. This PR resolves the inconsistency by standardizing the logging approach.3. False Positive Dependencies from HTA
HTA returns false positives for sync dependencies, leading to invalid
later op -> earlier op
dependencies. This causes Chakra to fail in certain traces. The Chakra converter was found to encounter two critical failures:4. Support for PyTorch >2.5.0 and Updated Chakra Schema
The nightly version of PyTorch >2.5.0 appears to require support for schema version
1.1.1-chakra.0.0.4
.Updated Chakra to include the most recent schema version in its supported list.
5. Update trace_linker to use external_id for finding GPU op's parent CPU op
There were many operations matched with wrong parent CPU during trace linking.
This PR solves this problem using
external_id
instead ofev_idx
.6. Handling HTA Errors in Chakra
The trace linker was terminating unexpectedly due to errors in HTA. Although this may stem from trace inconsistencies, the issue does not occur when HTA is excluded.
Updated Chakra to handle these errors by raising exceptions instead of terminating the trace linker.
7. Proper Encoding of pg_name in Collective Operations
Identified an issue where
SendRecv
,Reduce-Scatter
andAll-Gather
operations do not correctly encode pg_name following updates on the PyTorch side.Modified Chakra to ensure proper encoding of
pg_name
in these collective operations.Test Plan
I tested the fixes using Mixtral 8x3B traces collected with the NeMo framework (NVIDIA).
traces_device_0.zip