-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Implemented ReciprocalEstimate
, ReciprocalExponent
, ReciprocalSqrtEstimate
, ReciprocalSqrtStep
, and ReciprocalStep
#103673
Conversation
updating branch due to assert issue.
This reverts commit aab2067.
Note regarding the
|
1 similar comment
Note regarding the
|
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics |
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. Thanks!
("VecBinOpTest.template", new Dictionary<string, string> { ["TestName"] = "ReciprocalStep_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalStep", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPRecipStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), | ||
("VecBinOpTest.template", new Dictionary<string, string> { ["TestName"] = "ReciprocalSquareRootStep_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootStep", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPReciprocalSqrtStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), | ||
("VecBinOpTest.template", new Dictionary<string, string> { ["TestName"] = "ReciprocalSquareRootStep_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootStep", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPReciprocalSqrtStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), | ||
("VecBinOpTest.template", new Dictionary<string, string> { ["TestName"] = "ReciprocalStep_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalStep", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPReciprocalSqrtStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), |
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 and line below should be FPReciprocalStepFused
. That is the reason CI tests are failing. https://dev.azure.com/dnceng-public/public/_build/results?buildId=713553&view=ms.vss-test-web.build-test-results-tab&runId=17847992&resultId=108403&paneView=debug
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.
please fix the AdvSimd test
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.
2 tests are still failing.
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
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 |
…eciprocalSqrtEstimate`, `ReciprocalSqrtStep`, and `ReciprocalStep` (dotnet#103673) * Added ConverToInt32 and ConvertToUInt32 for float inputs. * Added flags to handle only low predicate registers. * Fix whitespace * Remove special codegen flag * Added new test template for operations with different return types. * Add new test template. * Added api for ConvertToInt32 and ConvertToUInt 32 for double. * Finished 4/5 Round intrinsics for sve fp. * Completed ReciprocalExponent SVE api. * Revert "Finished 4/5 Round intrinsics for sve fp." This reverts commit aab2067. * Reciprocal SVE apis - note: ReciprocalExponent still has issues. * Completed ReciprocalExponent SVE api. * fixed naming. * Fixed some naming. * fixed more affect function names. * Fixed some more naming and retested. All stress tests pass. * fixed more helper function naming.
Contributes to #99957
Stress test output without
ReciprocalExponent
:ReciprocalExponent
Stress test output:cc @dotnet/arm64-contrib
Edit: issue resolved
Note: Currently Blocked on
ReciprocalExponent
for testing.ReciprocalExponent
uses the FRECPX instruction. When running the tests, the values I'm generating using the functions inHelper.cs
are way off from the expected results.My current implementation in
Helpers.c
s is:public static double RecipExpo(double op1) => Math.Pow(op1, -1);
Here's some example error messages: