-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Simd #13262
Simd #13262
Conversation
Also tagging @tannergooding and @ViktorHofer for a technical review. |
docs/standard/simd.md
Outdated
|
||
## How to use SIMD? | ||
|
||
Before executing custom SIMD algorithms, it is possible to check if the host machine supports SIMD using <xref:System.Numerics.Vector.IsHardwareAccelerated?displayProperty=nameWithType>, which returns a <xref:System.Boolean>. |
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.
I think this should be explained that IsHardwareAccelerated
returning true
only indicates that some functionality may be hardware accelerated. It doesn't provide any guarantees of what functions are accelerated (you may even end up in a scenario where one function is accelerated but another function is not).
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.
This makes sense, I will make some changes.
@tannergooding Tnx for your suggestions, I will make some changes based on your review
@FIVIL Do you still plan to address the feedback on this PR? |
@tdykstra Sure, I am currently testing new |
- Updated the date - Changed terms from **SIMD-enabled** to **SIMD-accelerated** - Fixed any spelling errors - Fixed code spacing - Adjusted markdown structure - Brought acro score from 77 to 92
Please re-review. I've updated the submission with the following changes:
|
|
||
## Remarks | ||
|
||
SIMD is more likely to remove one bottleneck and expose the next, for example memory throughput. In general the performance benefit of using SIMD varies depending on the specific scenario, and in some cases it can even perform worse than simpler non-SIMD equivalent code. |
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.
End with a note that users should benchmark and profile their code to identify hot spots and ensure that changes are meeting their performance goals/needs?
Can we link to https://github.com/dotnet/BenchmarkDotNet?
Overall this looks really good, thanks for investing the time into this. I just had a couple minor questions/feedback items 😄 |
I tried working on rewording it but I feel like I'll misrepresent the details. Can you submit a suggestion where you want changes? This way you can reword them easily without having to fork and submit a huge update Just click the icon shown below when making a comment on a specific line |
@tannergooding Ping on my last comment :) |
docs/standard/simd.md
Outdated
|
||
## How to use SIMD? | ||
|
||
Before executing custom SIMD algorithms, it is possible to check if the host machine supports SIMD using <xref:System.Numerics.Vector.IsHardwareAccelerated?displayProperty=nameWithType>, which returns a <xref:System.Boolean>. |
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.
Before executing custom SIMD algorithms, it is possible to check if the host machine supports SIMD using <xref:System.Numerics.Vector.IsHardwareAccelerated?displayProperty=nameWithType>, which returns a <xref:System.Boolean>. | |
Before executing custom SIMD algorithms, it is possible to check if the host machine supports SIMD using <xref:System.Numerics.Vector.IsHardwareAccelerated?displayProperty=nameWithType>, which returns a <xref:System.Boolean>. However, this does not indicate all members are accelerated just that some members may be. Which members are accelerated are hardware dependent. |
Co-Authored-By: Tanner Gooding <[email protected]>
Co-Authored-By: Tanner Gooding <[email protected]>
Co-Authored-By: Tanner Gooding <[email protected]>
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.
Something is going on with github. I can't accept suggestions and I see old versions when trying to review. I did a lot of rewrite work about a month ago and maybe that is causing problems? I think it's good to go though.
This PR contains a simple tutorial and examples for SIMD-enabled types in .NET.
fixes #12660
/cc @rpetrusha