-
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
JIT ARM64-SVE: Add Count*BitElements #101188
Conversation
Note regarding the
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@kunalspathak @dotnet/arm64-contrib |
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 some questions.
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs
Show resolved
Hide resolved
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Outdated
Show resolved
Hide resolved
@@ -2887,6 +2887,10 @@ | |||
|
|||
(string templateFileName, Dictionary<string, string> templateData)[] SveInputs = new [] | |||
{ | |||
("ScalarUnOpTest.template", new Dictionary<string, string> { ["TestName"] = "Sve_Count16BitElements", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "Count16BitElements", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "SveMaskPattern", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "SveMaskPattern.All", ["ValidateResult"] = "isUnexpectedResult = (result != (UInt64)(Unsafe.SizeOf<Vector<Int16>>() / sizeof(Int16)));",}), |
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.
From #100606 (comment), LargestVectorSize
should be 256
. You can fix it in a follow-up PR.
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
…sses. TEST_LABEL: ent-arch-aarch64 TEST_IMG: ubuntu/dotnet-build TEST_CMD: safe ./projects/dotnet/test-runtime.sh --scope coreclr,libs Jira: ENTLLT-7328 Change-Id: I727edf8652a5c8648e7008d4ca47e7a4f36d5a1e
src/coreclr/jit/hwintrinsic.h
Outdated
// The intrinsic has an enum operand. Using this implies HW_Flag_HasImmediateOperand. | ||
HW_Flag_HasEnumOperand = 0x80000, |
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.
It's not clear to me why we need this in addition to HasImmediateOperand
?
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.
It's not clear to me why we need this in addition to
HasImmediateOperand
?
This is just for the hwintrinsiccodegen - so that it can pick the correct emitIns_
function to call (namely emitIns_R_PATTERN
).
Although, given an immediate and enum are effectively the same, I wonder if we should eventually do some refactoring so that it goes via emitIns_R_I()
using an int
and then remove emitIns_R_PATTERN()
.
Stress test results:
|
@a74nh, what does this output mean like 0, 1, 2,...? |
@JulieLeeMSFT - those are the environment variables value we are setting before executing all the test cases. This is to future proof ourselves until we make SVE machines in CI operational and run the stress legs. |
…en processes." This reverts commit 2937557.
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
* JIT ARM64-SVE: Add Count*BitElements * Generic ValidateResult testing * Fix formatting * Add option to change SVE vector length for current and children processes. TEST_LABEL: ent-arch-aarch64 TEST_IMG: ubuntu/dotnet-build TEST_CMD: safe ./projects/dotnet/test-runtime.sh --scope coreclr,libs Jira: ENTLLT-7328 Change-Id: I727edf8652a5c8648e7008d4ca47e7a4f36d5a1e * Revert "Add option to change SVE vector length for current and children processes." This reverts commit 2937557. * fix CreateTrueMask --------- Co-authored-by: Swapnil Gaikwad <swapnil.gaikwad@arm.com>
* JIT ARM64-SVE: Add Count*BitElements * Generic ValidateResult testing * Fix formatting * Add option to change SVE vector length for current and children processes. TEST_LABEL: ent-arch-aarch64 TEST_IMG: ubuntu/dotnet-build TEST_CMD: safe ./projects/dotnet/test-runtime.sh --scope coreclr,libs Jira: ENTLLT-7328 Change-Id: I727edf8652a5c8648e7008d4ca47e7a4f36d5a1e * Revert "Add option to change SVE vector length for current and children processes." This reverts commit 2937557. * fix CreateTrueMask --------- Co-authored-by: Swapnil Gaikwad <swapnil.gaikwad@arm.com>
Moves HW_Category_EnumPattern to a flag, as these APIs need both EnumPattern and HW_Category_Scalar.
Test results: