-
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: Added SVE GetFfr, SetFfr, LoadVectorFirstFaulting, GatherVectorFirstFaulting #105595
Conversation
…ectorFirstFaulting.
…ly without the FirstFaulting test. Added SveFfrTest template.
somewhat workable code cleanup Remove FFR Add all the GetFfr* wip Work with MskCns() model Use physReg approach Remove commented prototypes working Remove bunch of unnecessary code Remove SpecialImport from GetFFR/SetFFR/LoadFirstFaulting some more code cleanup some fixup
private const string SystemNative = "libSystem.Native"; | ||
|
||
// NOTE: Shim returns null pointer on failure, not non-null MAP_FAILED sentinel. | ||
[DllImport(SystemNative, EntryPoint = "SystemNative_MMap", SetLastError = true)] |
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.
nit: you should be able to access Interop.Libraries.SystemNative
here for the lib name constant
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.
or maybe just consume Interop.MMap.cs which is already in the shared location?
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.
Because we directly reference BoundedMemory.cs
and its implementations in Sve_r.csproj
and Sve_ro.csproj
, I do not have access to any other API in the TestUtilities.csproj
nor do I have access to library internals; which means I cannot access Interop.Libraries.SystemNative
.
src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Creation.cs
Outdated
Show resolved
Hide resolved
SystemNative is not runtime specific. It is available when running on Mono too. We have number libraries that use it and that work on Mono just fine. |
Ok, that's good to know. I assumed it wouldn't be able to access it as I got an error calling into the library here: https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-105595-merge-e7641fefa451458d81/Invariant.Tests/1/console.5fc11457.log?helixlogtype=result |
It looks like the error is just wasm specific. |
This is wasm build. This error says that |
I added the check for wasm, @jkotas does it look ok? |
LIR::Use use; | ||
bool foundUse = BlockRange().TryGetUse(node, &use); | ||
|
||
if (m_ffrTrashed) |
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.
Is this code adding the extra arg that is checked for in hwintrinsiccodegenarm64.cpp which causes the wrFFR ?
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.
Hmm, now I'm wondering if this code was left over from a merge.
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.
Ok, this was not left over. @kunalspathak added this for this PR.
When looking at hwintrinsiccodegenarm64.cpp, it does seem to be the case as it checks for the num of operands.
@@ -3658,6 +3658,118 @@ public new abstract class Arm64 : AdvSimd.Arm64 | |||
public static unsafe Vector<ulong> GatherVectorByteZeroExtend(Vector<ulong> mask, byte* address, Vector<ulong> indices) { throw new PlatformNotSupportedException(); } | |||
|
|||
|
|||
/// <summary> |
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.
Could you add the "// Unextended load, first-faulting" above this similar to the other APIs. In both API files. And for the other APIs you're adding too.
@@ -4842,6 +4842,26 @@ public new abstract partial class Arm64 : System.Runtime.Intrinsics.Arm.AdvSimd. | |||
public static unsafe System.Numerics.Vector<ulong> GatherVectorByteZeroExtend(System.Numerics.Vector<ulong> mask, byte* address, System.Numerics.Vector<long> indices) { throw null; } | |||
public static System.Numerics.Vector<ulong> GatherVectorByteZeroExtend(System.Numerics.Vector<ulong> mask, System.Numerics.Vector<ulong> addresses) { throw null; } | |||
public static unsafe System.Numerics.Vector<ulong> GatherVectorByteZeroExtend(System.Numerics.Vector<ulong> mask, byte* address, System.Numerics.Vector<ulong> indices) { throw null; } | |||
|
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.
Remove any new blank lines from this file please.
Merging. I carefully looked into each of the current failing CI legs and they are not related to the changes made here. |
Contributes to #99957
Same as #104502 but with a separate impl of BoundedMemory specifically used for SVE first faulting APIs.