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

Enable FEATURE_SIMD and FEATURE_AVX_SUPPORT for System V #4243

Closed
CarolEidt opened this issue May 12, 2015 · 6 comments
Closed

Enable FEATURE_SIMD and FEATURE_AVX_SUPPORT for System V #4243

CarolEidt opened this issue May 12, 2015 · 6 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI optimization
Milestone

Comments

@CarolEidt
Copy link
Contributor

@LLITCHEV See PR # 981, which enables it for amd64 windows.

@pgavlin
Copy link
Contributor

pgavlin commented Nov 9, 2015

Is there any particular reason that SIMD isn't enabled on Linux yet? AFAIK it shouldn't affect the CC-related code unless we want to project Vector to __m128/__m256 (for SSE/AVX, respectively). Note that the projection to __m256 may require some invasive changes, as these values are passed in up to four vector registers and require proper handling of the SSEUP classification.

@CarolEidt
Copy link
Contributor Author

I don't know if Lubo has done any more detailed analysis on this, but even apart from projecting these types, we may run into unexpected issues where we have inadvertently made assumptions about how these are passed. I don't think it would be too hard to try enabling it, and then we would have a better idea about whether there are any issues, and can then estimate the cost of addressing them.

@stephentoub
Copy link
Member

(For reference, it'd be great to get this fixed by RC2 so that code using the corefx System.Numerics.Vectors.dll library isn't negatively affected. Thanks!)

@RussKeldorph RussKeldorph assigned CarolEidt and unassigned LLITCHEV Nov 11, 2015
@benaadams
Copy link
Member

This will directly effect the performance of the AspNet Kestrel server on Linux when using coreclr which heavily makes use of System.Numerics.Vectors e.g. MemoryPoolIterator for request parsing.

/cc @davidfowl

CarolEidt referenced this issue in CarolEidt/coreclr Jan 13, 2016
Most of the changes involve checking varTypeIsStruct instead of TYP_STRUCT in
cases where the SIMD types are treated like other structs, and then adding
a few special cases for SIMD types. This fixes half of issue #983.
A previous version of this PR exposed issues with JIT/SIMD tests being inconsistently
compiled wrt optimization. This change modifies those tests to always
compile both with and without optimization.
CarolEidt referenced this issue in CarolEidt/coreclr Jan 14, 2016
Most of the changes involve checking varTypeIsStruct instead of TYP_STRUCT in
cases where the SIMD types are treated like other structs, and then adding
a few special cases for SIMD types. This fixes half of issue #983.
A previous version of this PR exposed issues with JIT/SIMD tests being inconsistently
compiled wrt optimization. This change modifies those tests to always
compile both with and without optimization.
CarolEidt referenced this issue in CarolEidt/coreclr Jan 14, 2016
Most of the changes involve checking varTypeIsStruct instead of TYP_STRUCT in
cases where the SIMD types are treated like other structs, and then adding
a few special cases for SIMD types.  The UNIX ABI implementation currently requires
that struct handles be preserved through code generation, so this required some
additional changes. Finally, the code that "homes" incoming arguments required changes
to handle incoming SIMD register args that need to be reassembled into their assigned
registers. That method was slightly refactored, primarily because it had cases that
should have been ifdef'd out for 64 bits. It needs further refactoring, but that is
left for future work. This fixes half of issue #983.
A previous version of this PR exposed issues with JIT/SIMD tests being inconsistently
compiled wrt optimization. This change modifies those tests to always
compile both with and without optimization.
CarolEidt referenced this issue in CarolEidt/coreclr Jan 15, 2016
Most of the changes involve checking varTypeIsStruct instead of TYP_STRUCT in
cases where the SIMD types are treated like other structs, and then adding
a few special cases for SIMD types.  The UNIX ABI implementation currently requires
that struct handles be preserved through code generation, so this required some
additional changes. Finally, the code that "homes" incoming arguments required changes
to handle incoming SIMD register args that need to be reassembled into their assigned
registers. That method was slightly refactored, primarily because it had cases that
should have been ifdef'd out for 64 bits. It needs further refactoring, but that is
left for future work. This fixes half of issue #983.
A previous version of this PR exposed issues with JIT/SIMD tests being inconsistently
compiled wrt optimization. This change modifies those tests to always
compile both with and without optimization.
@CarolEidt
Copy link
Contributor Author

FEATURE_SIMD is now enabled. I am currently working on enabling AVX2 support, which is the other half of dotnet/coreclr#983

@benaadams
Copy link
Member

Excellent! Thank you very much 😄

CarolEidt referenced this issue in CarolEidt/coreclr Jan 20, 2016
The existing code was assuming that there would be callee-save
registers for SIMD, but with the Unix ABI there are none.

Fix #983
CarolEidt referenced this issue in CarolEidt/coreclr Jan 20, 2016
The existing code was assuming that there would be callee-save
registers for SIMD, but with the Unix ABI there are none.

Fix #983
mmitche referenced this issue in mmitche/coreclr Feb 9, 2016
The existing code was assuming that there would be callee-save
registers for SIMD, but with the Unix ABI there are none.

Fix #983
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@msftgits msftgits added this to the 1.0.0-rc2 milestone Jan 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI optimization
Projects
None yet
Development

No branches or pull requests

6 participants