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

Arm64: Perf regressions from using SIMD registers in cp/init blk #68665

Closed
performanceautofiler bot opened this issue Apr 28, 2022 · 5 comments
Closed
Assignees
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Milestone

Comments

@performanceautofiler
Copy link

Run Information

Architecture arm64
OS Windows 10.0.19041
Baseline 0e18cfda13a8136103c83442e1a649cdecc237b0
Compare e99fb185aa10ef177d19a51fd77b7a4b75db5395
Diff Diff

Regressions in System.Collections.Tests.Perf_PriorityQueue<Guid, Guid>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Dequeue_And_Enqueue - Duration of single invocation 360.81 μs 393.83 μs 1.09 0.10 False

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Collections.Tests.Perf_PriorityQueue&lt;Guid, Guid&gt;*'

Payloads

Baseline
Compare

Histogram

System.Collections.Tests.Perf_PriorityQueue<Guid, Guid>.Dequeue_And_Enqueue(Size: 1000)


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 393.8312946428572 > 375.5193683712122.
IsChangePoint: Marked as a change because one of 12/28/2021 8:42:38 AM, 3/11/2022 5:51:22 PM, 3/22/2022 12:26:23 PM, 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -10.172369143799347 (T) = (0 -390501.608364899) / Math.Sqrt((107673280.03447784 / (23)) + (64971817.728144415 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.08483928514506854 = (359962.635675274 - 390501.608364899) / 359962.635675274 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

Docs

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

### Run Information
Architecture arm64
OS Windows 10.0.19041
Baseline 0e18cfda13a8136103c83442e1a649cdecc237b0
Compare e99fb185aa10ef177d19a51fd77b7a4b75db5395
Diff Diff

Regressions in System.Collections.Sort<BigStruct>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Array - Duration of single invocation 25.91 μs 28.36 μs 1.09 0.02 False

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Collections.Sort&lt;BigStruct&gt;*'

Payloads

Baseline
Compare

Histogram

System.Collections.Sort<BigStruct>.Array(Size: 512)


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 28.357679999999995 > 27.0780774.
IsChangePoint: Marked as a change because one of 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -28.458509482208502 (T) = (0 -28540.473542612937) / Math.Sqrt((149725.95701163352 / (23)) + (34861.173802585356 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.10341043430836364 = (25865.691183627958 - 28540.473542612937) / 25865.691183627958 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

Docs

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

Run Information

Architecture arm64
OS Windows 10.0.19041
Baseline 0e18cfda13a8136103c83442e1a649cdecc237b0
Compare e99fb185aa10ef177d19a51fd77b7a4b75db5395
Diff Diff

Regressions in System.Numerics.Tests.Perf_Matrix4x4

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
CreatePerspectiveBenchmark - Duration of single invocation 9.38 ns 10.91 ns 1.16 0.36 False
CreatePerspectiveOffCenterBenchmark - Duration of single invocation 10.33 ns 11.73 ns 1.14 0.28 False

graph
graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Numerics.Tests.Perf_Matrix4x4*'

Payloads

Baseline
Compare

Histogram

System.Numerics.Tests.Perf_Matrix4x4.CreatePerspectiveBenchmark


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 10.90804951957129 > 9.701711073200466.
IsChangePoint: Marked as a change because one of 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -18.28884276868399 (T) = (0 -11.012037642335747) / Math.Sqrt((0.08219326073850179 / (23)) + (0.06756336953274368 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.17545810886796995 = (9.368294420071624 - 11.012037642335747) / 9.368294420071624 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

```#### System.Numerics.Tests.Perf_Matrix4x4.CreatePerspectiveOffCenterBenchmark

```log

Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 11.729371543426122 > 10.775939399716382.
IsChangePoint: Marked as a change because one of 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -14.66297878277187 (T) = (0 -11.968116311712715) / Math.Sqrt((0.08440368285019897 / (23)) + (0.10302373076959741 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.14386294973311037 = (10.46289357873262 - 11.968116311712715) / 10.46289357873262 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

Docs

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

@performanceautofiler performanceautofiler bot added arm64 untriaged New issue has not been triaged by the area owner labels Apr 28, 2022
@AndyAyersMS
Copy link
Member

Sort seems to be #68085.

@AndyAyersMS AndyAyersMS transferred this issue from dotnet/perf-autofiling-issues Apr 28, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@AndyAyersMS AndyAyersMS added the tenet-performance-benchmarks Issue from performance benchmark label Apr 28, 2022
@AndyAyersMS
Copy link
Member

@kunalspathak FYI

@AndyAyersMS AndyAyersMS added the tenet-performance Performance related issue label Apr 28, 2022
@kunalspathak kunalspathak self-assigned this Apr 28, 2022
@danmoseley danmoseley added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 28, 2022
@ghost
Copy link

ghost commented Apr 28, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Architecture arm64
OS Windows 10.0.19041
Baseline 0e18cfda13a8136103c83442e1a649cdecc237b0
Compare e99fb185aa10ef177d19a51fd77b7a4b75db5395
Diff Diff

Regressions in System.Collections.Tests.Perf_PriorityQueue<Guid, Guid>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Dequeue_And_Enqueue - Duration of single invocation 360.81 μs 393.83 μs 1.09 0.10 False

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Collections.Tests.Perf_PriorityQueue&lt;Guid, Guid&gt;*'

Payloads

Baseline
Compare

Histogram

System.Collections.Tests.Perf_PriorityQueue<Guid, Guid>.Dequeue_And_Enqueue(Size: 1000)


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 393.8312946428572 > 375.5193683712122.
IsChangePoint: Marked as a change because one of 12/28/2021 8:42:38 AM, 3/11/2022 5:51:22 PM, 3/22/2022 12:26:23 PM, 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -10.172369143799347 (T) = (0 -390501.608364899) / Math.Sqrt((107673280.03447784 / (23)) + (64971817.728144415 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.08483928514506854 = (359962.635675274 - 390501.608364899) / 359962.635675274 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

Docs

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

### Run Information
Architecture arm64
OS Windows 10.0.19041
Baseline 0e18cfda13a8136103c83442e1a649cdecc237b0
Compare e99fb185aa10ef177d19a51fd77b7a4b75db5395
Diff Diff

Regressions in System.Collections.Sort<BigStruct>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Array - Duration of single invocation 25.91 μs 28.36 μs 1.09 0.02 False

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Collections.Sort&lt;BigStruct&gt;*'

Payloads

Baseline
Compare

Histogram

System.Collections.Sort<BigStruct>.Array(Size: 512)


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 28.357679999999995 > 27.0780774.
IsChangePoint: Marked as a change because one of 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -28.458509482208502 (T) = (0 -28540.473542612937) / Math.Sqrt((149725.95701163352 / (23)) + (34861.173802585356 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.10341043430836364 = (25865.691183627958 - 28540.473542612937) / 25865.691183627958 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

Docs

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

Run Information

Architecture arm64
OS Windows 10.0.19041
Baseline 0e18cfda13a8136103c83442e1a649cdecc237b0
Compare e99fb185aa10ef177d19a51fd77b7a4b75db5395
Diff Diff

Regressions in System.Numerics.Tests.Perf_Matrix4x4

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
CreatePerspectiveBenchmark - Duration of single invocation 9.38 ns 10.91 ns 1.16 0.36 False
CreatePerspectiveOffCenterBenchmark - Duration of single invocation 10.33 ns 11.73 ns 1.14 0.28 False

graph
graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Numerics.Tests.Perf_Matrix4x4*'

Payloads

Baseline
Compare

Histogram

System.Numerics.Tests.Perf_Matrix4x4.CreatePerspectiveBenchmark


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 10.90804951957129 > 9.701711073200466.
IsChangePoint: Marked as a change because one of 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -18.28884276868399 (T) = (0 -11.012037642335747) / Math.Sqrt((0.08219326073850179 / (23)) + (0.06756336953274368 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.17545810886796995 = (9.368294420071624 - 11.012037642335747) / 9.368294420071624 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

```#### System.Numerics.Tests.Perf_Matrix4x4.CreatePerspectiveOffCenterBenchmark

```log

Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 11.729371543426122 > 10.775939399716382.
IsChangePoint: Marked as a change because one of 4/22/2022 9:08:35 PM, 4/27/2022 8:46:50 AM falls between 4/19/2022 6:32:34 PM and 4/27/2022 8:46:50 AM.
IsRegressionStdDev: Marked as regression because -14.66297878277187 (T) = (0 -11.968116311712715) / Math.Sqrt((0.08440368285019897 / (23)) + (0.10302373076959741 / (15))) is less than -2.028094000977961 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (23) + (15) - 2, .025) and -0.14386294973311037 = (10.46289357873262 - 11.968116311712715) / 10.46289357873262 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

Docs

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

Author: performanceautofiler[bot]
Assignees: kunalspathak
Labels:

tenet-performance, tenet-performance-benchmarks, area-CodeGen-coreclr, untriaged, refs/heads/main, RunKind=micro, Windows 10.0.19041, Regression, CoreClr, arm64

Milestone: -

@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label May 5, 2022
@JulieLeeMSFT JulieLeeMSFT added this to the 7.0.0 milestone May 5, 2022
@kunalspathak
Copy link
Member

For Sort and Matrix4x4, I can clearly see the asmdiffs because of use of SIMD registers so I believe that it is because of #68085. The same benchmarks are not affected on Ubuntu. There were also equal wins on other benchmarks in dotnet/perf-autofiling-issues#4992. Looking at the tradeoffs and given the code size improvement, I am inclined to not fix it. The only fix would be to revert this change.

Sort:

image

InsertionSort:

image

Matrix4x4:

image

@kunalspathak kunalspathak changed the title [Perf] Changes at 4/23/2022 1:52:07 AM Arm64: Perf regressions from using SIMD registers in cp/init blk May 19, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 22, 2022
@jeffhandley jeffhandley added arch-arm64 runtime-coreclr specific to the CoreCLR runtime and removed arm64 labels Dec 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

5 participants