-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
SPMI: Ensure we disable loop alignment consistently #82100
SPMI: Ensure we disable loop alignment consistently #82100
Conversation
Recently we disabled loop alignment in SPMI diffs, but this was only done for the SPMI invocations when we generate disassembly. This would result in the diffs run seeing different generated code than subsequent disassembly runs. This splits the environment variables we want to have enabled in the diffs SPMI invocation out into its own dictionary. These are force overridden.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsRecently we disabled loop alignment in SPMI diffs, but this was only done for the SPMI invocations when we generate disassembly. This would result in the diffs run seeing different generated code than subsequent disassembly runs. This splits the environment variables we want to have enabled in the diffs SPMI invocation out into its own dictionary. These are force overridden.
|
cc @dotnet/jit-contrib PTAL @kunalspathak @BruceForstall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. How was this caught? Also, what is "force" about? I see its reference in other places in the file too.
I noticed when I did an asmdiffs run that the diffs reported by jit-analyze did not sum to the one reported by superpmi.py. Force is used to override JIT env vars that were recorded into the context. For example, if we in the future record a test with |
/azp run runtime-coreclr superpmi-diffs |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Kicked off a superpmi-diffs run at https://dev.azure.com/dnceng-public/public/_build/results?buildId=172165&view=results |
Hmm, there are two same size diffs in the SPMI-diffs run, but the .dasm files do not have any diffs. Will investigate. |
That happens on main too. It seems there is some issue with recording relocations, the diffs that SPMI is finding is in constants that should have been recorded as relocations. When I look at the dump, the offsets for those relocations are off by 0x10 bytes. |
I will merge this and continue investigating the relocation issue separately. |
Hmm, actually no, there is no relocation emitted for that particular constant I was looking at, which is probably the problem: runtime/src/coreclr/jit/compiler.cpp Line 3114 in 3a36920
A newly added test has |
Maybe we should fix the JIT to emit relocations. However, we generally shouldn't have tests that set DOTNET_JitStress, since the mix of stress modes invoked might change based on the test hash (theoretically this shouldn't change unless the test is altered). Looks like the tests are: JIT\Regression\JitBlue\Runtime_81585\Runtime_81585.csproj Instead, these should use DOTNET_JitStressModeNames and set exactly the stress modes needed for the test. |
Recently we disabled loop alignment in SPMI diffs, but this was only done for the SPMI invocations when we generate disassembly. This would result in the diffs run seeing different generated code than subsequent disassembly runs.
This splits the environment variables we want to have enabled in the diffs SPMI invocation out into its own dictionary. These are force overridden.