Skip to content
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

Add a trace validator helper and simple unit test for #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

briancoutinho
Copy link
Contributor

@briancoutinho briancoutinho commented Apr 18, 2024

Summary:

Summary

  • Adds a trace validation tool that can check PyTorch host execution traces. This is helpful for schema changes, and integration testing
  • Add a unit test to check if execution_trace.py works correctly on preset traces.
  • Minor: helpers to read semantic version of pytorch and chakra!

Trace validator

>$ python3 validate_trace.py ~/et_collections/et_resnet.json
num ops = 3186, num comms = 12, num triton ops = 0
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
Trace validation result =  True

Unit test

$>> python3 test_execution_trace.py
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['0', 'default_pg'], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
 record_param_comms, process group args = ('Tuple[String,String]', ['', ''], [[], []])
.
----------------------------------------------------------------------
Ran 1 test in 0.700s

OK

Differential Revision: D56325885

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 18, 2024
@briancoutinho briancoutinho force-pushed the export-D56325885 branch 2 times, most recently from 94f18e8 to 4ef3b8b Compare April 22, 2024 05:04
Summary:
## Summary
* Adds a trace validation tool that can check PyTorch host execution traces. This is helpful for schema changes, and integration testing
* Add a unit test to check if execution_trace.py works correctly on preset traces.
* Minor: helpers to read semantic version of pytorch and chakra!

Reviewed By: shengbao-zheng

Differential Revision: D56325885
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants