-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Reenable unified instruction set logic #33936
Reenable unified instruction set logic #33936
Conversation
@dotnet/jit-contrib Note, this changes the jit interface |
/azp list |
@davidwrighton azp run is useless now, see #32777 I have triggered outerloop for this PR manually https://dev.azure.com/dnceng/public/_build/results?buildId=569342, but it won't merge master changes (if there were any) with your branch if that is important. |
InstructionSet_SSE=1, | ||
InstructionSet_SSE2=2, | ||
InstructionSet_SSE3=3, | ||
InstructionSet_SSSE3=4, | ||
InstructionSet_SSE41=5, | ||
InstructionSet_SSE42=6, | ||
InstructionSet_AVX=7, | ||
InstructionSet_AVX2=8, |
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.
Not needed at this point (still plenty of room in the bitmask), but for instruction sets that are implied by other instruction sets, a better strategy could be used here to pack these bits. For instance, for x86 SIMD, a "SIMD level" thing could be used (e.g. InstructionSet_SIMD_Level >= InstructionSet_SSE42
to test if SSE 4.2 is supported, with InstructionSet_SIMD_Level
being in this case a 3-bit mask).
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.
Agreed, one thing to note is that the representation as a 64bit bitmask is an internal implementation detail, and we can change it fairly easily when we reach to having more than 62 instruction sets on a specific architecture. I believe that this scheme should last for at least 5 more years, which is long enough I don't care to plan further ahead.
This reverts commit 5a71f14.
- Make sure to enable them based on the related 32bit instruction sets before disabling instruction sets that are enabled but not compatible with the instruction set hierarchy the runtime is designed for.
…back to the pre-revert state.
651b4a7
to
6eeb819
Compare
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. I did not review the actual contents from the original PR that was reverted. I just looked at the EnsureValidInstructionSetSupport
fix, and the JIT interface guid change
Revert #33901 to reenable #33730. The issue was that the runtime was incorrectly disabling use in the jit compiler for all hardware intrinsics on 64 bit platforms at runtime. Fixed by calling
Set64BitInstructionSetVariants
beforeEnsureValidInstructionSetSupport
.