Skip to content
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

Implement various other simple vector APIs from 93513 #103837

Merged
merged 44 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
07e72ed
Update Vector<T> to implement ISimdVector<TSelf, T>
tannergooding Jun 20, 2024
383cc66
Expose various constants for Vector2/3/4
tannergooding Jun 19, 2024
845978c
Expose Exp, Log, and Log2 on the other vector types
tannergooding Jun 19, 2024
10ed01f
Expose CopySign on the vector types
tannergooding Jun 19, 2024
a450767
Expose DegreesToRadians and RadiansToDegrees on the vector types
tannergooding Jun 20, 2024
87e13a0
Expose Hypot on the vector types
tannergooding Jun 20, 2024
5bad72d
Expose Lerp on the vector types
tannergooding Jun 20, 2024
34879f6
Expose Truncate and Round on the vector types
tannergooding Jun 20, 2024
3e304c2
Cleanup some of the implementations to use helper functions where pos…
tannergooding Jun 21, 2024
43d4696
Expose Max, MaxMagnitude, MaxMagnitudeNumber, MaxNumber, Min, MinMagn…
tannergooding Jun 21, 2024
283301d
Expose Clamp on the various vector types
tannergooding Jun 19, 2024
b513e5c
Ensure mono handles the various zero and low-cost vector conversions
tannergooding Jun 21, 2024
0816d54
Apply formatting patch
tannergooding Jun 21, 2024
8e211ce
Ensure that TensorPrimitives uses the in-box vector operations on .NE…
tannergooding Jun 21, 2024
16e27d8
Fix some build failures
tannergooding Jun 21, 2024
753df42
Workaround a MonoJIT assertion
tannergooding Jun 22, 2024
574c15c
Ensure Hypot for double handles insignificant results
tannergooding Jun 22, 2024
d7bf16b
Merge remote-tracking branch 'dotnet/main' into fix-93513
tannergooding Jun 24, 2024
284ad12
Merge remote-tracking branch 'dotnet/main' into fix-93513
tannergooding Jun 27, 2024
79b225a
Remove part of the mono changes that were extracted to a separate PR
tannergooding Jun 27, 2024
50434a6
Apply suggestions from code review
tannergooding Jun 29, 2024
f1bf9b9
Merge remote-tracking branch 'dotnet/main' into fix-93513
tannergooding Jun 29, 2024
3f9bd35
Ensure tests are added for the new vector APIs
tannergooding Jun 29, 2024
dcffeb8
Fix the mono handling for IsNaN, IsNegative, and IsPositive
tannergooding Jun 29, 2024
6804456
Use the right op for WASM
tannergooding Jun 29, 2024
72d2dd6
Fix a round test to correctly expect -0
tannergooding Jun 29, 2024
aaa71b2
Fix some tests where the wrong parameter counts were being passed
tannergooding Jun 30, 2024
304324d
Ensure APIs are correctly handled for Vector<T>
tannergooding Jun 30, 2024
c722402
Fix the mono handling for OP_XCOMPARE_FP
tannergooding Jun 30, 2024
f5f7a31
Have Mono use the proper klass for IsPositive/IsNegative since we're …
tannergooding Jun 30, 2024
b34be17
Ensure Mono looks up the class namespace
tannergooding Jun 30, 2024
10b1513
Ensure mono inserts xcast where required and handles MultiplyAddEstimate
tannergooding Jul 1, 2024
bf3bc42
Add missing underscores to fix the mono build
tannergooding Jul 1, 2024
f114721
Add the if is_element_type_primitive check to MultiplyAddEstimate for…
tannergooding Jul 1, 2024
cbafcb5
Pass the right klass on Mono
tannergooding Jul 1, 2024
6ea941c
Ensure mono sets the metadata for add_ins
tannergooding Jul 1, 2024
5728b80
Ensure mono passes down the cast arg0
tannergooding Jul 1, 2024
a47ea2a
Fix the lerp for Mono to match the managed impl
tannergooding Jul 2, 2024
414b00a
Ensure mono lerp uses ins_amount for scaling y
tannergooding Jul 2, 2024
ea072a7
Merge branch 'main' into fix-93513
tannergooding Jul 3, 2024
3c3ef36
Use gtCloneExpr after the first fgMakeMultiUse if we need another copy
tannergooding Jul 4, 2024
a180caf
Merge branch 'main' into fix-93513
tannergooding Jul 7, 2024
4eabf81
Combine the SN_IsNegative and SN_IsPositive logic
tannergooding Jul 8, 2024
73fda9a
Update src/mono/mono/mini/simd-intrinsics.c
tannergooding Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3292,6 +3292,31 @@ class Compiler
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdIsNaNNode(var_types type,
GenTree* op1,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdIsNegativeNode(var_types type,
GenTree* op1,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdIsPositiveNode(var_types type,
GenTree* op1,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdIsPositiveInfinityNode(var_types type,
GenTree* op1,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdIsZeroNode(var_types type,
GenTree* op1,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdLoadNode(
var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

Expand All @@ -3307,18 +3332,33 @@ class Compiler
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdMaxNativeNode(var_types type,
GenTree* op1,
GenTree* op2,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdMinNode(var_types type,
GenTree* op1,
GenTree* op2,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdMinNativeNode(var_types type,
GenTree* op1,
GenTree* op2,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdNarrowNode(var_types type,
GenTree* op1,
GenTree* op2,
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdRoundNode(
var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

GenTree* gtNewSimdShuffleNode(var_types type,
GenTree* op1,
GenTree* op2,
Expand Down Expand Up @@ -3356,6 +3396,9 @@ class Compiler
CorInfoType simdBaseJitType,
unsigned simdSize);

GenTree* gtNewSimdTruncNode(
var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

GenTree* gtNewSimdUnOpNode(genTreeOps op,
var_types type,
GenTree* op1,
Expand Down
Loading
Loading