Skip to content

[mono][interp][Perf] Interpreter: missing vector instrinsics causing 117 Regressions on 6/15/2024 2:08:36 PM #109375

Closed as not planned
@performanceautofiler

Description

@performanceautofiler

Run Information

Name Value
Architecture x64
OS ubuntu 22.04
Queue TigerUbuntu
Baseline 5ba3c05f3bf0ea789421c6e69d3983ecdc086f36
Compare 4834a507be8698d901ff36d10284ca8703743b93
Diff Diff
Configs CompilationMode:tiered, LLVM:false, MonoAOT:false, MonoInterpreter:true, RunKind:micro_mono

Regressions in System.Numerics.Tests.Perf_Vector3

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
22.83 ns 116.75 ns 5.11 0.20 True
15.96 ns 93.12 ns 5.83 0.21 True
25.43 ns 109.34 ns 4.30 0.20 True
18.68 ns 23.17 ns 1.24 0.28 False
19.78 ns 151.08 ns 7.64 0.25 True
16.78 ns 27.63 ns 1.65 0.26 False
18.00 ns 101.79 ns 5.66 0.28 True
47.02 ns 235.60 ns 5.01 0.20 True
12.34 ns 20.89 ns 1.69 0.23 True
30.50 ns 190.08 ns 6.23 0.11 True
42.05 ns 319.84 ns 7.61 0.12 True
17.42 ns 97.88 ns 5.62 0.22 True
18.72 ns 154.32 ns 8.24 0.23 True
8.02 ns 70.05 ns 8.74 0.40 True
14.88 ns 89.70 ns 6.03 0.34 True
21.43 ns 98.72 ns 4.61 0.26 True
15.73 ns 24.97 ns 1.59 0.30 False
15.79 ns 21.56 ns 1.37 0.32 False
55.57 ns 318.87 ns 5.74 0.16 True
16.04 ns 23.33 ns 1.46 0.32 False
15.77 ns 52.41 ns 3.32 0.20 True
14.44 ns 90.73 ns 6.28 0.29 True
27.16 ns 111.43 ns 4.10 0.14 True
16.49 ns 23.63 ns 1.43 0.27 False
18.14 ns 103.09 ns 5.68 0.25 True
15.98 ns 22.50 ns 1.41 0.34 False
11.63 ns 101.90 ns 8.76 0.34 True
45.86 ns 319.84 ns 6.97 0.08 True
16.84 ns 22.45 ns 1.33 0.34 False
9.13 ns 69.76 ns 7.64 0.39 True
36.95 ns 364.80 ns 9.87 0.15 True

graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Repro Steps

Prerequisites (Build files either built locally or downloaded from payload above)

  • Libraries build extracted to runtime/artifacts or build instructions: Libraries README args: -subset libs+libs.tests -rc release -configuration Release -arch $RunArch -framework net8.0
  • CoreCLR product build extracted to runtime/artifacts/bin/coreclr/$RunOS.$RunArch.Release, build instructions: CoreCLR README args: -subset clr+libs -rc release -configuration Release -arch $RunArch -framework net8.0
  • Mono Runtime build extracted to runtime/artifacts/bin/mono/$RunOS.$RunArch.Release, build instructions: MONO README args: -arch $RunArch -os $RunOS -s mono+libs+host+packs -c Release
  • Dotnet SDK installed for dotnet commands
  • Running commands from the runtime folder

Linux

# Set $RunDir to the runtime directory
RunDir=`pwd`

# Set the OS, arch, and OSId
RunOS='linux'
RunOSId='linux'
RunArch='x64'

# Create mono dotnet
mkdir -p $RunDir/artifacts/dotnet-mono
$RunDir/build.sh -subset libs.pretest -configuration release -ci -arch $RunArch -testscope innerloop /p:RuntimeArtifactsPath=$RunDir/artifacts/bin/mono/$RunOS.$RunArch.Release /p:RuntimeFlavor=mono
cp $RunDir/artifacts/bin/runtime/net8.0-$RunOS-Release-$RunArch/* $RunDir/artifacts/bin/testhost/net8.0-$RunOS-Release-$RunArch/shared/Microsoft.NETCore.App/8.0.0 -rf
cp $RunDir/artifacts/bin/testhost/net8.0-$RunOS-Release-$RunArch/* $RunDir/artifacts/dotnet-mono -r
cp $RunDir/artifacts/bin/coreclr/$RunOS.$RunArch.Release/corerun $RunDir/artifacts/dotnet-mono/shared/Microsoft.NETCore.App/8.0.0/corerun

# Create Core Root
$RunDir/src/tests/build.sh release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release

# Clone performance 
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir/performance

# Use Interpreter
export MONO_ENV_OPTIONS="--interpreter"

# One line run:
python3 $RunDir/performance/scripts/benchmarks_ci.py --csproj $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Numerics.Tests.Perf_Vector3*' --bdn-artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime  --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir/artifacts/dotnet-mono/shared/Microsoft.NETCore.App/8.0.0/corerun" 

# Individual Commands:
# Restore 
dotnet restore $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --packages $RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Build
dotnet build $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Run
dotnet run --project $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter 'System.Numerics.Tests.Perf_Vector3*' --anyCategories Libraries Runtime " --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir/artifacts/dotnet-mono/shared/Microsoft.NETCore.App/8.0.0/corerun --artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --packages $RunDir/performance/artifacts/packages

Windows

# Set $RunDir to the runtime directory
$RunDir="FullPathHere"

# Set the OS, arch, and OSId
RunOS='windows'
RunOSId='win'
RunArch='x64'

# Create mono dotnet
mkdir -p $RunDir/artifacts/dotnet-mono
$RunDir/build.sh -subset libs.pretest -configuration release -ci -arch $RunArch -testscope innerloop /p:RuntimeArtifactsPath=$RunDir\artifacts\bin\mono\$RunOS.$RunArch.Release /p:RuntimeFlavor=mono
xcopy $RunDir\artifacts\bin\runtime\net8.0-$RunOS-Release-$RunArch\ $RunDir\artifacts\bin\testhost\net8.0-$RunOS-Release-$RunArch\shared\Microsoft.NETCore.App\8.0.0\ /e /y
xcopy $RunDir\artifacts\bin\testhost\net8.0-$RunOS-Release-$RunArch\ $RunDir\artifacts\dotnet-mono\ /e /y
xcopy $RunDir\artifacts\bin\coreclr\$RunOS.$RunArch.Release\corerun $RunDir\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun /y

# Create Core Root
$RunDir\src\tests\build.cmd release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release

# Clone performance 
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir\performance

# Use Interpreter
export MONO_ENV_OPTIONS="--interpreter"

# One line run:
python3 $RunDir\performance\scripts\benchmarks_ci.py --csproj $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Numerics.Tests.Perf_Vector3*' --bdn-artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime  --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe" 

# Individual Commands:
# Restore 
dotnet restore $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --packages $RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Build
dotnet build $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Run
dotnet run --project $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter 'System.Numerics.Tests.Perf_Vector3*' --anyCategories Libraries Runtime " --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe --artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --packages $RunDir\performance\artifacts\packages

System.Numerics.Tests.Perf_Vector3.SquareRootBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.LengthBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.DistanceSquaredBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.MultiplyFunctionBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.MaxBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.MultiplyOperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.DivideByScalarBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.LerpBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.CreateFromVector2WithScalarBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.NormalizeBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.TransformNormalByMatrix4x4Benchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.MultiplyByScalarOperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.MinBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.EqualityOperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.DotBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.MultiplyByScalarBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.SubtractFunctionBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.SubtractOperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.ReflectBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.DivideByVector3Benchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.EqualsBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.LengthSquaredBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.DistanceBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.DivideByVector3OperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.DivideByScalarOperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.AddOperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.AbsBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.TransformByMatrix4x4Benchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.AddFunctionBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.InequalityOperatorBenchmark

ETL Files

Histogram

JIT Disasms

System.Numerics.Tests.Perf_Vector3.ClampBenchmark

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions