Skip to content
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

Consider defaulting AltJIT to all ISAs enabled #41518

Closed
tannergooding opened this issue Aug 28, 2020 · 6 comments · Fixed by #64158
Closed

Consider defaulting AltJIT to all ISAs enabled #41518

tannergooding opened this issue Aug 28, 2020 · 6 comments · Fixed by #64158
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@tannergooding
Copy link
Member

tannergooding commented Aug 28, 2020

The AltJIT allows one to preview the jitted code for other architectures (such as ARM from x64) or platforms (such as Linux from Windows).

However, certain JIT settings, such as the ISAs used, are largely dependent on the machine being run against and so you cannot currently check codegen for something like X86.Avx2 if your underlying hardware doesn't support it. Nor can you check for something like Arm.Dp from a x64 machine.

It would therefore be beneficial to default the AltJIT such that all ISAs are enabled by default. Individual ISAs can then be disabled by using the COMPlus_Enable{IsaName}=0 flags (e.g. COMPlus_EnableAvx2=0).

This will allow codegen via an altjit to be easily checked against multiple different hardware configurations.

category:implementation
theme:altjit
skill-level:beginner
cost:small

@tannergooding tannergooding added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Aug 28, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Aug 28, 2020
@tannergooding tannergooding removed the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Aug 28, 2020
@tannergooding
Copy link
Member Author

CC. @CarolEidt, @kunalspathak, @echesakovMSFT

@BruceForstall BruceForstall added this to the 6.0.0 milestone Aug 28, 2020
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Aug 28, 2020
@BruceForstall
Copy link
Member

To be particular, it's only the non-VM-matching, or cross-targeting, altjits where you want this. (It's possible to have same-platform, same-architecture altjit, but more rare these days.)

@tannergooding
Copy link
Member Author

It might be beneficial to do it (or have an opt-in) even for same-architecture.

I'm thinking of cases like AVX-512 or SVE, where the amount of hardware we have that supports it is limited but where you might want to observe and do basic validation of the emitted assembly.

@CarolEidt
Copy link
Contributor

I've often thought this would be a good idea, but never got around to filing an issue.

I'm thinking of cases like AVX-512 or SVE, where the amount of hardware we have that supports it is limited but where you might want to observe and do basic validation of the emitted assembly.

IIRC we used to be able to do this, but lost the ability when we added more (and generally better) ISA support.

@BruceForstall BruceForstall added the JitUntriaged CLR JIT issues needing additional triage label Oct 28, 2020
@BruceForstall BruceForstall removed the JitUntriaged CLR JIT issues needing additional triage label Nov 10, 2020
@EgorBo
Copy link
Member

EgorBo commented Dec 13, 2020

It'd be nice to have, I've integrated AltJIT into my Disasmo add-in for VS2019 but unfortunately it doesn't allow to play with ARM64's HW intrinsics on Windows-x64 because of this issue 🙁
screenshot

@EgorBo
Copy link
Member

EgorBo commented Mar 30, 2021

Marking as Future, it's nice to have, but not critical for 6.0 release.

@EgorBo EgorBo modified the milestones: 6.0.0, Future Mar 30, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 23, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 3, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants