-
-
Notifications
You must be signed in to change notification settings - Fork 968
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
NativeAOT benchmark started from .Net Framework host doesn't have all intrinsics enabled #2060
Comments
To be honest I am not sure if we want to invest in such edge case scenario if there is an easy workaround (running host as .NET Core app). But I understand that it can lead to confusion (not apples to apples comparison depending on host process runtime). @jkotas is there a way to tell ILC to use all available instructions? Sth like |
We do not have that today. It would require duplicating the runtime hardware capabilities detection in the AOT compiler, or somehow getting access to the runtime detection logic, The AOT compiler cannot use the trick with calling IsSupported properties like what Benchmark.NET does. We want to be able to compile the AOT compiler using itself. It means that the IsSupported properties return what the compiler was AOT compiled with, not the current capabilities of the machine. |
I have opened dotnet/runtime#73246 to have this tracked. It is not the first time that this option is being discussed. |
AFAIK you have to use a Net Framework host in order to use it in a benchmark, so doing benchmarks with 2 hosts is at least annoying. |
You don't: https://benchmarkdotnet.org/articles/configs/toolchains.html#multiple-frameworks-support |
Support for instructionset:native merged in dotnet/runtime#87865 and unless it gets reverted, will be available in .NET 8. |
BDN 0.13.1.1835 from nightlies is supposed to run NativeAOT with current machines CPU features, yet with a .Net Framework host on an AVX2 machine I got:
which was due to the fact the host can't check for their support on Net Framework (I don't understand why it's SSE4.2, not SSE2 though, does NativeAOT default to that? if yes then that's a bit weird).
A possible solution would be to generate a separate .Net app that'd perform the CPU checks and return the data to the Net Framework host.
The text was updated successfully, but these errors were encountered: