Conversation
fix lint errors fix lint errors fix lint errors
Without specifying the kineto filepath explicitly, HTA may pick arbitrary files from the `trace_dir` and either provide incorrect analysis results, or fail in some weird ways.
…neto-file-explicitly Specify the kineto filepath explicitly when running HTA analysis
JSON format for Chakra ET
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
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 opdependencies. This causes Chakra to fail in certain traces. The Chakra converter was found to encounter two critical failures:4. 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_idinstead ofev_idx.5. 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.
6. Proper Encoding of pg_name in Collective Operations
Identified an issue where
SendRecv,Reduce-ScatterandAll-Gatheroperations do not correctly encode pg_name following updates on the PyTorch side.Modified Chakra to ensure proper encoding of
pg_namein these collective operations.7. Getter in ETFeeder
Updated ETFeeder to have getter functions of I/O attributes.
The I/O attributes include value/shape/type for the node.
Node that this feature is also required in other code in Feeder ( json_node.cpp json_node.h wrapper_node.cpp wrapper_node.h) which can be done after we decide details of JSON format.
Test Plan
I tested the fixes using Mixtral 8x3B traces collected with the NeMo framework (NVIDIA).
traces_device_0.zip