[data, torch_profile] test: add st of torch and mstx#23
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the testing infrastructure by introducing end-to-end tests for MSTX and PyTorch profilers. It provides concrete examples of profiler outputs and a utility for data compression, ensuring the robustness and maintainability of the profiling analysis tools. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for torch and mstx profilers, including new test data and end-to-end tests. My review focuses on improving the quality and robustness of the new tests and utility scripts. I've suggested using pytest fixtures to make the tests cleaner and more reliable. For the new data conversion script, I've recommended changes to make it more reusable and to improve its error handling. I also pointed out some inconsistencies in the test data and a best practice of not committing generated files to the repository.
|
ci name is not correct. |
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install -r requirements.txt |
There was a problem hiding this comment.
pip install 没有使用 --no-cache-dir,建议添加 --no-cache-dir 避免缓存问题
|
|
||
| - name: Run profiling_data_analysis_st tests | ||
| run: | | ||
| pytest -s -x tests/special_e2e |
There was a problem hiding this comment.
pytest 没有超时限制,建议添加 --timeout=300 或其他合适的超时设置
|
|
||
| - name: Run profiling_data_analysis_st tests | ||
| run: | | ||
| pytest -s -x tests/special_e2e |
| ``` | ||
| ### 数据解析文件 prof_*.json.gz,解析文件缺少字段见解析日志warning,解析文件内容示例: | ||
|
|
||
|  |
There was a problem hiding this comment.
use text instead of png
| └── <role>/ | ||
| └── prof_*.json.gz | ||
| ``` | ||
| ### 数据解析文件 prof_*.json.gz,解析文件内容包含distrubutedInfo、traceEvent等字段,数据内容一般包含ts、dur等字段,解析文件内容示例: |
| └── ASCEND_PROFILER_OUTPUT/ | ||
| └── trace_view.json | ||
| ``` | ||
| ### 数据解析文件 trace_view.json,解析文件内容必须包含"ph": "M",且"name": "Overlap Analysis"对应"pid"的数据,该数据一般包含ts、dur等字段,解析文件内容示例: |
| @@ -0,0 +1,101 @@ | |||
| [ | |||
There was a problem hiding this comment.
修改文件路径,文件夹名字非公共部分可以用xxx表述
| @@ -0,0 +1,50 @@ | |||
| { | |||
|
/lgtm |
What does this PR do?
add st of torch and mstx
Checklist Before Starting
[{modules}] {type}: {description}(This will be checked by the CI){modules}includemstx,mvtx,torch_profile,deployment,perf,algo,env,doc,data,cfg,ci,misc,,like[mstx, ci]{type}is infeat,fix,refactor,chore,test[BREAKING]to the beginning of the title.[BREAKING][mstx, torch_profile] feat: support timeline parsingTest
API and Usage Example
# Add code snippet or script demonstrating how to use thisDesign & Code Changes
Checklist Before Submitting
Important
Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always