-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Regressions in Math.Min/Max benchmarks #88096
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsRun Information
Regressions in BilinearTest
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'BilinearTest*' PayloadsHistogramBilinearTest.Interpol_Scalar
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.MathBenchmarks.Single
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.MathBenchmarks.Single*' PayloadsHistogramSystem.MathBenchmarks.Single.AcosPi
Description of detection logic
JIT DisasmsSystem.MathBenchmarks.Single.AsinPi
Description of detection logic
JIT DisasmsSystem.MathBenchmarks.Single.Min
Description of detection logic
JIT DisasmsSystem.MathBenchmarks.Single.Max
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.MathBenchmarks.Double
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.MathBenchmarks.Double*' PayloadsHistogramSystem.MathBenchmarks.Double.Min
Description of detection logic
JIT DisasmsSystem.MathBenchmarks.Double.Max
Description of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository
|
Regressed via #87641 cc @tannergooding |
@EgorBo, what hardware are the The only change for |
I am not sure but Tiger should stand for Intel (without avx-512) |
Reproduces on OwlWindows (AMD, no avx-512) too |
Sounds like a general CSE issue then and likely one that impacts other GT_INTRINSIC nodes. Will take a look when I'm back next week. |
@tannergooding it seems that |
Codegen on non-avx512 hw: ; Method Prog+Double:MinTest()
G_M35241_IG01: ;; offset=0000H
push rsi
sub rsp, 96
vzeroupper
vmovaps xmmword ptr [rsp+50H], xmm6
vmovaps xmmword ptr [rsp+40H], xmm7
vmovaps xmmword ptr [rsp+30H], xmm8
vmovaps xmmword ptr [rsp+20H], xmm9
;; size=32 bbWeight=1 PerfScore 10.25
G_M35241_IG02: ;; offset=0020H
vxorps xmm6, xmm6, xmm6
vmovsd xmm7, qword ptr [reloc @RWD00]
vmovsd xmm8, qword ptr [reloc @RWD08]
xor esi, esi
vmovsd xmm9, qword ptr [reloc @RWD16]
align [2 bytes for IG03]
;; size=32 bbWeight=1 PerfScore 9.83
G_M35241_IG03: ;; offset=0040H
vsubsd xmm8, xmm8, xmm9
vmovsd xmm0, qword ptr [reloc @RWD00]
vmovaps xmm1, xmm8
call [System.Math:Min(double,double):double]
vaddsd xmm6, xmm0, xmm6
inc esi
cmp esi, 0x1388
jl SHORT G_M35241_IG03
;; size=38 bbWeight=4 PerfScore 55.00
G_M35241_IG04: ;; offset=0066H
vsubsd xmm0, xmm7, xmm6
vandps xmm0, xmm0, xmmword ptr [reloc @RWD32]
vucomisd xmm0, qword ptr [reloc @RWD48]
ja SHORT G_M35241_IG06
;; size=22 bbWeight=1 PerfScore 10.00
G_M35241_IG05: ;; offset=007CH
vmovaps xmm6, xmmword ptr [rsp+50H]
vmovaps xmm7, xmmword ptr [rsp+40H]
vmovaps xmm8, xmmword ptr [rsp+30H]
vmovaps xmm9, xmmword ptr [rsp+20H]
add rsp, 96
pop rsi
ret
;; size=30 bbWeight=1 PerfScore 17.75
G_M35241_IG06: ;; offset=009AH
mov rcx, 0x7FF9291DB1C8 ; System.Exception
call CORINFO_HELP_NEWSFAST
mov rsi, rax
mov rcx, rsi
call [System.Exception:.ctor():this]
mov rcx, rsi
call CORINFO_HELP_THROW
int3
;; size=36 bbWeight=0 PerfScore 0.00
RWD00 dq 3FF0000000000000h ; 1
RWD08 dq 3FF001A36E2EB1C4h ; 1.0004
RWD16 dq 3F3A36E2EB1C432Dh ; 0.0004
RWD24 dd 00000000h, 00000000h
RWD32 dq 7FFFFFFFFFFFFFFFh, 7FFFFFFFFFFFFFFFh
RWD48 dq 3E7FF19E23A836FCh ; 1.19e-07
; Total bytes of code: 190 |
That's an unfortunate side effect for a number of math APIs which are implemented in managed but which we want to CSE... Given we track the original call handle, how hard would it be to have the inliner look at |
It would not be "hard" to allow VNing/CSEing of user calls, but it would be somewhat involved because code assumes in a number of places that only helper calls can be "understood". Inlining |
Run Information
Regressions in BilinearTest
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
Payloads
Baseline
Compare
Histogram
BilinearTest.Interpol_Scalar
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.MathBenchmarks.Single
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
Payloads
Baseline
Compare
Histogram
System.MathBenchmarks.Single.AcosPi
Description of detection logic
JIT Disasms
System.MathBenchmarks.Single.AsinPi
Description of detection logic
JIT Disasms
System.MathBenchmarks.Single.Min
Description of detection logic
JIT Disasms
System.MathBenchmarks.Single.Max
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.MathBenchmarks.Double
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
Payloads
Baseline
Compare
Histogram
System.MathBenchmarks.Double.Min
Description of detection logic
JIT Disasms
System.MathBenchmarks.Double.Max
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: