Closed Avangardum closed 10 months ago
Hi @Avangardum
Could you please share your project file?
Hello, @adamsitnik.
I uploaded the whole solution https://github.com/Avangardum/BenchmarkDotNetBugReproduction
@Avangardum thanks for sharing the repro.
It works on my machine:
BenchmarkDotNet v0.13.10, Windows 11 (10.0.22621.2428/22H2/2022Update/SunValley2)
AMD Ryzen Threadripper PRO 3945WX 12-Cores, 1 CPU, 24 logical and 12 physical cores
.NET SDK 9.0.100-alpha.1.23531.2
[Host] : .NET 7.0.13 (7.0.1323.51816), X64 RyuJIT AVX2
NativeAOT 7.0 : .NET 7.0.11-servicing.23424.27, X64 NativeAOT AVX2
Job=NativeAOT 7.0 Runtime=NativeAOT 7.0
| Method | Mean | Error | StdDev |
|------- |---------:|---------:|---------:|
| Foo | 16.56 ms | 0.171 ms | 0.160 ms |
Could you please apply the following attribute:
[SimpleJob(RuntimeMoniker.NativeAot70)]
+ [KeepBenchmarkFilesAttribute]
public class Benchmarks
And share the "IlcInstructionSet" part of BenchmarkDotNetBugReproduction\bin\Release\net7.0\NativeAOT 7.0\BenchmarkDotNet.Autogenerated.csproj
Here is mine:
<IlcInstructionSet>base,sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,aes,bmi,bmi2,fma,lzcnt,pclmul,popcnt</IlcInstructionSet>
<IlcInstructionSet>base,sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,aes,bmi,bmi2,fma,lzcnt,pclmul,popcnt,avxvnni,serialize</IlcInstructionSet>
@MichalStrehovsky Do you have any idea why using X86Serialize
fails with an exception for @Avangardum ? It works fine on my machine, however I am using newer SDK.
https://github.com/dotnet/BenchmarkDotNet/issues/2463#issuecomment-1808495018 has serialize
as an instruction set specified. This cannot be set on .NET 7 due to a bug (whoever was adding the instruction set forgot to add AOT handling). This bug was fixed in https://github.com/dotnet/runtime/commit/c81e83ab01fb3aed44de34e5aff659d28e6c91f4#diff-65f20fbb1fbd6c815168e9d3b2b358c4fd02aea226f2152099427a594310b876R114. It's fixed in .NET 8.
@Avangardum the bug got fixed, you can either wait until 0.13.11 gets shipped to nuget.org (2 weeks from now) or try latest version from our preview feed: https://benchmarkdotnet.org/articles/guides/nuget.html?q=nuget#nightly
I created a very simple benchmark:
When I run it, I get the following output: