-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add --no-optimistic-instruction-set option for crossgen2.
#121175
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
Add --no-optimistic-instruction-set option for crossgen2.
#121175
Conversation
Could be used for compile on x64 host for arm64 target (for example, during Tizen OS image creation).
| new("--reference", "-r") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, false), DefaultValueFactory = result => Helpers.BuildPathDictionary(result.Tokens, false), Description = SR.ReferenceFiles }; | ||
| public Option<string> InstructionSet { get; } = | ||
| new("--instruction-set") { Description = SR.InstructionSets }; | ||
| public Option<bool> NoOptimisticInstructionSet { get; } = |
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.
The same switch should probably exist for NAOT as well, to make it simpler to manage (we've had requests before and it can make it simpler to target an exact machine).
A "better" option might even be to just make it part of --instruction-set so that by default you get --instruction-set sse4.2,optimistic for example, and you can opt-out like you would for other instructions sets by specifying -optimistic. Then it's a bit more "intuitive" and fits in with the other existing msbuild properties and general support that exists
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.
you can opt-out like you would for other instructions sets by specifying -optimistic
Do you mean --instruction-set -optimistic?
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.
Yes, or <IlcInstructionSet>-optimistic</IlcInstructionSet> and so on. That way it integrates with the existing pattern for how ISAs can be enabled or disabled.
It might warrant further weigh-in from @MichalStrehovsky and @EgorBo
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.
Yes, or
<IlcInstructionSet>-optimistic</IlcInstructionSet>and so on. That way it integrates with the existing pattern for how ISAs can be enabled or disabled.It might warrant further weigh-in from @MichalStrehovsky and @EgorBo
This sounds like a good plan to me!
What's the issue here? Shouldn't we default to just the baseline and any ISAs that fit into the same encoding schema? That is, cross compiling should mirror the default ISAs you'd get if you ran crossgen natively. |
We want to compile exactly for instruction set specified and not include optimistic one. For example, current optimistic one includes sets not available on rpi4 and we get a lot of rejected R2R methods during execution. |
Could you please point me on NAOT related sources? I don't find any sources except |
Gotcha. So specifically the problem is that
Yes, that would be the place where the NAOT command line options are if you were to keep this as If you were instead to do the Specficially, it checks for just You'd end up specially handling |
|
@tannergooding as you proposed, I create another approach for disable optimistic instruction set to be added - #121203 could you please take a look? I close this PR, looks like new one looks really better and more clear. |
Could be used for compile on x64 host for arm64 target (for example, during Tizen OS image creation).
CC @gbalykov