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

Add support for Vector<T>.Indices and Vector.CreateSequence #97880

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

tannergooding
Copy link
Member

This covers the xplat APIs approved in #94008

Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Feb 2, 2024

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
See info in area-owners.md if you want to be subscribed.

Issue Details

This covers the xplat APIs approved in #94008

Author: tannergooding
Assignees: tannergooding
Labels:

area-System.Runtime.Intrinsics, new-api-needs-documentation

Milestone: -

@@ -596,6 +597,7 @@ public partial struct Vector4 : System.IEquatable<System.Numerics.Vector4>, Syst
public Vector(T[] values, int index) { throw null; }
public static System.Numerics.Vector<T> AllBitsSet { get { throw null; } }
public static int Count { get { throw null; } }
public static System.Numerics.Vector<T> Indices { get { throw null; } }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use this here?

Vector<int> init = new Vector<int>((ReadOnlySpan<int>)[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several places that this should be usable including in LINQ and in Tensors

However, I was going to put up an issue and cover them in a follow up PR since source.dot.net wasn't bringing them up at the moment (making finding all the places rather difficult): https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs,2157880a86aea82e,references

@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.linux.arm64.checked.mch +0.01%

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (-0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (-0.01% to +0.00%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch -0.01%

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


Throughput diffs for windows/x86 ran on windows/x86

FullOpts (+0.00% to +0.01%)
Collection PDIFF
realworld.run.windows.x86.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for linux/arm64 ran on linux/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.linux.arm64.checked.mch +0.01%

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (0.00% to +0.01%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch +0.01%

Throughput diffs for windows/x64 ran on linux/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.linux.arm64.checked.mch +0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (0.00% to +0.01%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch +0.01%

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for windows/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch -0.01%

Throughput diffs for windows/x64 ran on linux/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.linux.arm64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (-0.01% to +0.00%)
Collection PDIFF
libraries.pmi.linux.arm64.checked.mch -0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (-0.01% to +0.00%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch -0.01%

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #97880

Throughput diffs

Throughput diffs for windows/x64 ran on windows/x64

Overall (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%
FullOpts (+0.00% to +0.01%)
Collection PDIFF
benchmarks.run_pgo.windows.x64.checked.mch +0.01%

Details here


@tannergooding
Copy link
Member Author

ping @dotnet/jit-contrib, this is ready for review and is a simple change

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JIT changes LGTM

@tannergooding tannergooding merged commit 05fb35e into dotnet:main Feb 5, 2024
204 of 207 checks passed
@tannergooding tannergooding deleted the createseq branch February 5, 2024 22:14
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants