Uh oh!
There was an error while loading. Please reload this page.
Create superpmi-asmdiffs pipeline - #61194
Conversation
ghost
commented
Nov 4, 2021
Tagging subscribers to this area: @JulieLeeMSFT Issue Detailsnull
|
`asmdiffs` can download coredistools, for example, so don't output download progress if the user wants to suppress it. Also, move the `download` log file to the "uploads" area so it gets uploaded to the AzDO files. Temporarily, only do diffs with benchmarks, so speed things up
ceb7fec to
5bd071dCompareAdd downloading of portable git for use on Helix for jit-analyze. It is added to the correlation payload that is copied to Helix machines (currently, we only use Windows Helix machines).
Overall summary.md file should be uploaded as well.
a37188a to
c806ca6CompareBruceForstall
commented
Nov 6, 2021
Sample run AzDO results with forced diffs (loop cloning disabled for diff compiler), with summary in the "Extensions" tab: and the published artifacts contain the "overall summary" Markdown files in the |
Add a few more comments
BruceForstall
commented
Nov 6, 2021
@dotnet/jit-contrib This is ready for review. PTAL. |
BruceForstall
commented
Nov 9, 2021
Some ideas for improvements:
|
AndyAyersMS
commented
Nov 9, 2021
The extensions thing is pretty cool; I had no idea that existed. I find the current format requires a lot of scrolling to fully comprehend -- there is a lot of data and the interesting bits can be buried. It would be nice to have everything in one table and perhaps sorted by largest impact or some such. Doesn't work as well for detail/expand collapse but perhaps we can get to this via internal links or something? Also (assuming interesting/ unexpected diffs appear) is it obvious how to repro exactly what the CI did? Maybe echo out the repro commands somewhere (including exact base jit version used / exact collections used if we ever start versioning beyond the jit guid) |
BruceForstall
commented
Nov 9, 2021
The example I gave (here) has a lot of diffs, because I disabled loop cloning to force diffs. However, we are generating diffs for 6 platforms. And we propose to also generate PerfScore diff results. Do you have any suggestion on how to summarize this better? Kunal suggested something like "Impact" table here. Printing out repro commands makes sense. Can probably specify the precise baseline git hash used, but assume the diff is the current tree, and then just specify the correct Note, however, I don't want to gate this change on creating the "perfect" output. |
AndyAyersMS
commented
Nov 9, 2021
Yes, something very much like that would be great.
Agreed -- no need to hold this up based on my feedback; it is quite useful even as-is (eg trigger on community PRs that we think should be no diff). As we get mileage on it we will figure out enhancements to make it more useful. |
BruceForstall
commented
Nov 9, 2021
Currently it's set to trigger on every PR that touches the JIT directory. I think we should keep that level of checking. |
kunalspathak
commented
Nov 9, 2021
One more optimization we spoke about it to skip creating |
This affects `superpmi.py download` output
BruceForstall
commented
Nov 10, 2021
@kunalspathak, others: I updated this change for the feedback. |
BruceForstall
commented
Nov 10, 2021
Here's the Extensions page result we now generate if there are no diffs: This run completed successfully except the aspnet collection replay has MISSING data, and that is reported as an error code. |
…script There will be more changes required if we ever run on non-Windows platforms, so don't keep these partial measures.
kunalspathak
left a comment
There was a problem hiding this comment.
LGTM. Thanks for doing this, can't wait to trigger it on one of my PRs.
Uh oh!
There was an error while loading. Please reload this page.
kunalspathak
commented
Nov 10, 2021
I don't see the logic to upload other metric |
AndyAyersMS
commented
Nov 10, 2021
Agree -- thanks for working on this. 👍 |
BruceForstall
commented
Nov 10, 2021
True, I haven't done that. I can pass Generating the PerfScore metrics separately would require iterating over all the respective MCH directories, invoking jit-analyze specifically for each base/diff pair, and then collecting a summary_PerfScore.md file, which would be separately summarized and uploaded. This is more work than I want to do. So I think for now I'm not going to add additional metrics to the summary. |
Also, reduce timeout values
kunalspathak
commented
Nov 10, 2021
What do you mean? It will print the |
BruceForstall
commented
Nov 10, 2021
The implementation of the accurate CodeSize doesn't kick in when any metrics are specifically requested: runtime/src/coreclr/scripts/superpmi.py Lines 2030 to 2033 in 1d352fc There is no "accurate" total PerfScore number currently, just CodeSize. |
kunalspathak
commented
Nov 10, 2021
Can we do something like this in command= [ jit_analyze_path, "--md", md_summary_file, "-r", "--base", base_asm_location, "--diff", diff_asm_location ]
ifbase_bytesisnotNoneanddiff_bytesisnotNone:
m_command=command+ [ "--override-total-base-metric", str(base_bytes), "--override-total-diff-metric", str(diff_bytes) ]
run_and_log(m_command, logging.INFO)
# run again for non-code size metrics.non_code_size_metrics= [mforminself.coreclr_args.metricsifm!='CodeSize']
iflen(non_code_size_metrics ) >0:
m_command=command+ [ "--metrics", ",".join(non_code_size_metrics) ]
run_and_log(m_command, logging.INFO) |
kunalspathak
commented
Nov 10, 2021
By the way, I didn't realize until now that we can pass |
BruceForstall
commented
Nov 10, 2021
Something like that would work, but we'd then have two .md files, or have to force the second jit-analyze to append to the first one. I think a better solution is to pass "override" data on a per-metric basis. That is, teach jit-analyze to understand A not-mutually-exclusive alternative is to teach superpmi.py to (optionally?) create one summary.md file for each metric, e.g., |
kunalspathak
commented
Nov 10, 2021
I agree. We can just ask But then, we need to still change the logic around passing |
BruceForstall
commented
Nov 10, 2021
Yes, or generalize it as I suggest. |
kunalspathak
commented
Nov 10, 2021
Ok, whatever is easy and clean is fine then. |
Create a new
runtime-coreclr superpmi-asmdiffspipeline that runs SuperPMI asmdiffs for every change in the JIT directory.The diffs are run on two platforms: Windows x64 and Windows x86. Linux, and Arm64 and Arm32, asm diffs are done using cross-compilers, as follows:
The resulting summary .md files are uploaded into the pipeline artifacts, one .md file per platform (so, one for the Windows x64 runs and one for the Windows x86 runs). The results are also displayed in "Extensions" page of the AzDO pipeline.
It looks like the runs take about 50 minutes to complete (assuming not much waiting for machines).
The asm diffs pipeline is similar to the "superpmi-replay" pipeline, except:
mainbranch. Given this, it downloads the matching baseline JITs from the JIT rolling build artifacts in Azure Storage.jitutilsrepo and builds thejit-analyzetool, needed to generate the summary .md file.gitinstallation, asgit diffis used byjit-analyzefor analyzing the generated .dasm files of the diff.Extensionspage.As part of this implementation,
a. The
azdo_pipelines_util.pywas renamed tojitutil.py, and a lot of utility functions from superpmi.py were moved over to it. This was mostly to share the code for downloading and uncompressing .zip files. (There might be some slight changes to the output from the superpmi.py download commands that I'll have to look into.) However, I also moved a bunch of simple, more general helpers, for possible future sharing.b.
jitrollingbuild.py downloadcan now take no arguments and download a baseline JIT (from the JIT rolling build Azure Storage location), for the current enlistment, to the default location. Previously, it required a specific git_hash and target directory. There is similar logic in superpmi.py, but not quite the same.c. The
superpmi.py --no_progressoption was made global, and applied in a few more places.Fixes#59445