dotnet / dotnet/machinelearning

Remove the `AddScaleSU` performance regression for AVX

Open
#1,195 8 comments 1 reaction 0 assignees View on GitHub
area-Native help wanted Priority:3 tenet-performance
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

Our profiles show that `AddScaleSU` which should be faster with AVX is actually slower and takes more time. This can be confirmed running our CpuMathBenchmarks:

`..\..\Tools\dotnetcli\dotnet.exe run -c Release-Intrinsics -- -f *.AddScaleSU --join`

| Type | Method | Mean |
|----------------------- |----------- |---------:|
| AvxPerformanceTests | AddScaleSU | 4.012 ms |
| NativePerformanceTests | AddScaleSU | 2.966 ms |
| SsePerformanceTests | AddScaleSU | 2.916 ms |

This issue has been spotted by @eerhardt in August https://github.com/dotnet/machinelearning/pull/691#issuecomment-414364378

@helloguo suggested https://github.com/dotnet/machinelearning/pull/691#issuecomment-414375034 that `GatherVector256` intrinsic should be used

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.