-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ARM64-SVE: GatherVectorWithByteOffsets #103564
ARM64-SVE: GatherVectorWithByteOffsets #103564
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics |
Stress results - failures looks like they are the usual stress predicate issue. |
Last of the gather loads. @dotnet/arm64-contrib @kunalspathak |
ebe9363
to
abaa66a
Compare
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.
Added few comments around testing.
src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs
Show resolved
Hide resolved
private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, {Op2BaseType}* op2, {Op3VectorType}<{Op3BaseType}> op3, void* result, [CallerMemberName] string method = "") | ||
{ | ||
{Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; | ||
byte[] inArray2 = new byte[Unsafe.SizeOf<{Op2BaseType}>() * Op2ElementCount]; |
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.
This template is identical to SveGatherVectorIndices.template
except that byte[]
vs. {Op2BaseType[]}
and wondering if we add an argument like IndexType
or something that is same as Op2BaseType
for *Indices*
and is byte
for *Offset
?
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.
Three differences between the two:
byte[]
vs.{Op2BaseType[]}
- In
ValidateResult
functions, the byte array needs to be of sizeUnsafe.SizeOf<{Op2BaseType}>() * Op2ElementCount
instead ofOp2ElementCount
. - The result is validated by using a helper function
Load{RetBaseType}FromByteArray
instead of loading using array notationsecondOp[thirdOp[i]]
Agreed, the first one could be switched easily, but I think the second two would be confusing if generic.
src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveGatherVectorByteOffsets.template
Show resolved
Hide resolved
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
/ba-g timeout issues |
This is a standard gatherload, but the offset is measured in bytes rather than the size of the vector. Therefore testing will have byte array, but needs to load a 32/64bit value.