-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Vector int divide short byte #117996
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
Vector int divide short byte #117996
Conversation
|
Changes generally LGTM. There's a check that I think isn't quite doing what you intended and I listed some ways that we could accelerate on more than just AVX512 capable hardware. I'll let you decide if that's something you want to add support for or if a tracking issue should be opened instead. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
Changes overall LGTM. Few suggestions on cleanup and simplifications |
… is not supported
9db3705 to
81dcd40
Compare
tannergooding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC. @dotnet/jit-contrib for secondary review
EgorBo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@alexcovington does this have any test coverage on CI?
It does, which can be seen in some of the SPMI diffs. We have a divide test for each of the 10 core base types: https://github.com/dotnet/runtime/blob/main/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_General.cs#L850-L859 |
This is a follow up PR to #111505 and extends the logic to also support
byte,sbyte,short,ushort, anduint.I'm seeing good performance gains in microbenchmarks:
Disasm
System.Numerics.Tests.Perf_VectorOf<Byte>.DivisionOperatorBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<Byte>.DivideBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<Int16>.DivisionOperatorBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<Int16>.DivideBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<SByte>.DivisionOperatorBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<SByte>.DivideBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<UInt16>.DivisionOperatorBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<UInt16>.DivideBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<UInt32>.DivisionOperatorBenchmark
Base:
Diff:
System.Numerics.Tests.Perf_VectorOf<UInt32>.DivideBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<Byte>.DivisionOperatorBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<Byte>.DivideBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<Int16>.DivisionOperatorBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<Int16>.DivideBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<SByte>.DivisionOperatorBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<SByte>.DivideBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<UInt32>.DivisionOperatorBenchmark
Base:
Diff:
System.Runtime.Intrinsics.Tests.Perf_Vector128Of<UInt32>.DivideBenchmark
Base:
Diff: