Make RyuJIT/x86 the default x86 JIT#8260
Conversation
|
@dotnet/jit-contrib PTAL |
4357682 to
57809d5
Compare
|
Hi, I'm currenrly working on to enable x86 on Linux. Can RyuJIT work also on Linux? |
I'm a bit confused... once this merges, is the idea that you always leave COMPlus_AltJit unset to use Ryujit? |
|
@JosephTremoulet Yes, this makes CoreCLR/x86 behave more like CoreCLR/x64, where by default you get RyuJIT. Unlike CoreCLR/x64, though, for the time being, you will be able to opt in to an older JIT with COMPlus_UseWindowsX86CoreLegacyJit=1, and that JIT will be the Legacy Backend JIT if built from these sources or JIT32 if using the official packages. |
|
@seanshpark Great to hear you're working on x86 on Linux! RyuJIT/x86 isn't yet supported on Linux, so we can't comment on how well it works. If you have something working now, and this change breaks it, feel free to suggest changes or follow up with a subsequent PR yourself to revert to Legacy for Linux. Note that our assumption is that when CoreCLR/x86 comes to Linux, RyuJIT will be its JIT, so we certainly wouldn't object to you pushing forward with RyuJIT. |
|
Does this change update the lab jobs correctly such that the legacy_backend jobs pickup legacyjit.dll and the ryujit jobs pick up the correct jit? I assume that with this change COMPlus_AltJit will just be ignored? If not, we'll want to make sure that we update the jobs in the same PR. If we are picking up the correct jits, then I guess it would be ok to update the job definitions as a post step. |
|
@seanshpark @RussKeldorph LEGACY_BACKEND x86 also has no support for Linux currently. Or, I could say, RyuJIT/x86 and LEGACY_BACKEND should be equivalent in terms of Linux support, as far as I know. Thus, I don't believe we should ever enable LEGACY_BACKEND for Linux x86. We should only enable RyuJIT. |
|
@JosephTremoulet @RussKeldorph The only time you might want to use COMPLUS_AltJit is to use the LEGACY_BACKEND x86 JIT when you've also built JIT32 (via buildJit32). Pretty rare case. (In this case you'd use COMPlus_AltJitName=legacyjit.dll). |
|
@adiaaida I haven't touched any of the lab jobs. What do I need to do? |
|
I'm working on a patch for you. There aren't many changes. The one thing I'm not sure about is how to specify that we want to use legacyjit instead of the regular jit. |
|
@adiaaida @RussKeldorph We should consider whether we want to keep any of the legacy x86 lab runs or jobs. I don't think we need them. Also, we should get rid of all the "ryujit" x86 jobs. |
|
@adiaaida @RussKeldorph Ok, I take that back. We should have jobs that exercise the fallback-to-JIT32 path using |
|
Another option that might be simpler is to always build legacyjit.dll as an altjit. Then, build it additionally as a non-altjit compatjit.dll in the case where buildjit32 is not specified. Thus, we would always have the same set of jit dll names built, and the content of compatjit.dll would either be jit32 or LEGACY_BACKEND RyuJIT depending on whether buildjit32 was specified. I'm going to go with this, to simplify thinking about the build. |
57809d5 to
fae4074
Compare
|
@adiaaida @jashook @RussKeldorph @mmitche I made some big changes to netci.groovy to: (1) remove x86ryujit -- it is now just x86, (2) add x86compatjit. Comments? |
|
Ok, now I'm stuck. The PR generator hits this: That's this: but I don't see the Suggestions? |
netci.groovy
Outdated
| 'gcstress0x3' : ['COMPlus_GCStress' : '0x3'], 'gcstress0xc' : ['COMPlus_GCStress' : '0xC'], | ||
| 'gcstress0x3' : ['COMPlus_GCStress' : '0x3'], | ||
| 'gcstress0xc' : ['COMPlus_GCStress' : '0xC'], | ||
| 'zapdisable' : ['COMPlus_ZapDisable' : '0xC'], |
There was a problem hiding this comment.
Might as well fix the 0xC typo while you're here.
netci.groovy
Outdated
| 'jitstressregs3' : ['COMPlus_JitStressRegs' : '3'], 'jitstressregs4' : ['COMPlus_JitStressRegs' : '4'], | ||
| 'jitstressregs8' : ['COMPlus_JitStressRegs' : '8'], 'jitstressregs0x10' : ['COMPlus_JitStressRegs' : '0x10'], | ||
| def static jitStressModeScenarios = [ | ||
| 'minopts' : ['COMPlus_JITMinOpts' : '1'], |
There was a problem hiding this comment.
Funny I had this same reformatting in my pending change. Oh well...probably not too hard to merge.
| def osGroup = getOSGroup(os) | ||
| switch (architecture) { | ||
| case 'x64': | ||
| case 'x64': // editor brace matching: { |
There was a problem hiding this comment.
What is this for? To help you navigate the unreasonably large blocks?
@mmitche How do we printf-debug the groovy? |
JIT32 becomes compatjit.dll and RyuJIT LEGACY_BACKEND becomes legacyjit.dll (and is an altjit). If JIT32 is not being built, then RyuJIT LEGACY_BACKEND becomes compatjit.dll and is a normal jit (not an altjit). Both clrjit.dll and compatjit.dll are added to the JIT NuGet package.
067bfde to
aad8402
Compare
|
@dotnet-bot test ci please |
|
LGTM! |
|
CMake changes look good to me, |
|
I believe printing is just:
|
|
@swaroop-sridhar Is this just a random error (in the I'm going to try it again. |
|
@dotnet-bot test Windows_NT arm Cross Debug Build |
| @@ -0,0 +1,66 @@ | |||
| project(compatjit) | |||
|
|
|||
| # This compatjit.dll is only built if we are not building JIT32 as compatjit.dll. | |||
There was a problem hiding this comment.
Does this in the open build legacy_backend twice? Giving two dlls, compatjit.dll and legacyjit.dll which are the same thing?
There was a problem hiding this comment.
Yes. They're not quite the same, since one is an altjit and one is not. But essentially they are the same.
| } | ||
| // For x86, only add per-commit jobs for Windows | ||
| else if (architecture == 'x86ryujit' || architecture == 'x86lb') { | ||
| else if (architecture == 'x86' || architecture == 'x86compatjit' || architecture == 'x86lb') { |
There was a problem hiding this comment.
Do we need to run x86 compatjit as a PR trigger? Seems like this and legacy backend can now be outerloop tests run either per checkin or on a timer.
There was a problem hiding this comment.
I agree. We should back this off if these are for triggers. In this case, I just replaced the 2 existing with the 3 new archs. I'll call this a to-do.
|
@BruceForstall The failure downloading CoreDistools doesn't look like a random failure. |
|
@swaroop-sridhar well, when I retested, it worked :-) |
|
In the log for the new run, we can see that the error still exists, but doesn't cause the job to fail. |
|
Nice! 🎉 |
…RyuJit Make RyuJIT/x86 the default x86 JIT Commit migrated from dotnet/coreclr@db767b8
JIT32 becomes compatjit.dll and RyuJIT LEGACY_BACKEND becomes legacyjit.dll
(and is an altjit).
If JIT32 is not being built, then RyuJIT LEGACY_BACKEND becomes compatjit.dll
and is a normal jit (not an altjit).
Both clrjit.dll and compatjit.dll are added to the JIT NuGet package.