[Draft] Accelerate Half with FP16 ISA
#122649
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft PR for in-progress work to accelerate
System.Halfwith FP16 ISA.Current work done:
Add a
TYP_HALFto the .NET runtime, which is treated like aTYP_SIMDXX, but with some notable differences. Namely, aTYP_HALFis passed around via the xmm registers, and while it will pass avarTypeIsStructtest, it must be treated as a primitive in other places.Accelerate
System.Halfoperations with theTYP_HALFand some FP16 intrinsics. Not every possible function has been accelerated yet.For discussion:
I have currently worked around some checks to make
TYP_HALFbehave like a struct and a primitive. It's very ad-hoc at the moment.Much of the work to transform the named
System.Halfintrinsics into a sequence of intrinsic nodes is done inimportcall.cppand might want to be moved up into some of thegtNewSimdXXnodes.