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-SVE: GatherPrefetch #103826

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Conversation

a74nh
Copy link
Contributor

@a74nh a74nh commented Jun 21, 2024

Prefetch versions of the gather APIs. Essentially the same as gatherVector but has an extra enum and does not return anything.

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.

1 similar comment
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.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 21, 2024
Copy link
Contributor

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

@a74nh a74nh marked this pull request as ready for review June 21, 2024 16:57
@a74nh
Copy link
Contributor Author

a74nh commented Jun 21, 2024

I have a single failure in the testing around invalid value tests. Will investigate and fix Monday. Otherwise ready for review.

@dotnet/arm64-contrib @kunalspathak

@@ -1496,22 +1496,11 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node)
{
assert(hasImmediateOperand);
assert(HWIntrinsicInfo::HasEnumOperand(intrin.id));
if (intrin.op3->IsCnsIntOrI())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this block as HWIntrinsicImmOpHelper does all those checks for you.

@a74nh
Copy link
Contributor Author

a74nh commented Jun 30, 2024

Tests are now all fixed.

Issue was to ensure that all invalid values in the tests are actually out of range. (We treat 14 and 15 as in range values because the Arm instruction accepts them).

I'm now happy with this PR. (Someone will have to fix up any review comments as I'm away now for a few weeks).

@kunalspathak
Copy link
Member

Someone will have to fix up any review comments

Thanks for working on it. I will resolve merge conflicts and address any outstanding review comments.

case NI_Sve_GatherPrefetch64Bit:
case NI_Sve_GatherVector:
case NI_Sve_GatherVectorByteZeroExtend:
case NI_Sve_GatherVectorInt16SignExtend:
Copy link
Member

Choose a reason for hiding this comment

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

seems we missed adding this previously when we added other GatherVector APIs.

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.

LGTM

@kunalspathak kunalspathak merged commit 7b9f1c3 into dotnet:main Jul 2, 2024
165 of 167 checks passed
var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr);
var op2 = (byte*)_dataTable.inArray2Ptr;
var op3 = Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr);
{Isa}.{Method}(op1, op2, op3, {ValidPrefetch});
Copy link
Member

Choose a reason for hiding this comment

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

@a74nh - while testing something else, I realized that we are not validating the result in these tests.

mikabl-arm added a commit to mikabl-arm/dotnet-runtime that referenced this pull request Jul 5, 2024
mikabl-arm added a commit to mikabl-arm/dotnet-runtime that referenced this pull request Jul 5, 2024
kunalspathak added a commit that referenced this pull request Jul 6, 2024
* JIT ARM64-SVE: Add Sve.ConditionalExtract* APIs

* cleanup: fix formatting

* Update Helpers.cs

* cleanup: group and place APIs in alphabedical order and align the field

* Remove redundant HasScalarInputVariant flags from *Replicate intrinsics

* cleanup: place special intrinsics in alphabetical order

* cleanup: correctly specify emitted instructions in the comments

* fixup! cleanup: place special intrinsics in alphabetical order

* fixup! cleanup: group and place APIs in alphabedical order and align the field

* fixup! ARM64-SVE: GatherPrefetch (#103826)

* Revert "fixup! ARM64-SVE: GatherPrefetch (#103826)"

This reverts commit b0212ca.

* cleanup: align the lines for the newly added tests.

---------

Co-authored-by: Kunal Pathak <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Aug 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime.Intrinsics arm-sve Work related to arm64 SVE/SVE2 support community-contribution Indicates that the PR has been added by a community member new-api-needs-documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants