mathnet / mathnet-numerics

Math.NET Numerics
http://numerics.mathdotnet.com
MIT License
3.47k stars 893 forks source link

Use .NET Core hardware intrinsics to improve the performance? #565

Open helloguo opened 6 years ago

helloguo commented 6 years ago

Recently .NET Core enabled hardware intrinsics to generate SIMD instructions from SSE to AVX2. And more instructions are added into the .NET Core API interface. The instruction list can be found at https://github.com/dotnet/coreclr/blob/master/src/jit/hwintrinsiclistxarch.h.

Is it feasible to use .NET Core hardware intrinsics to rewrite some core linear algebra functions so that the performance could be improved by SIMD instructions?

cdrnet commented 6 years ago

Yes, absolutely - now that we properly support .Net Standard, performance in general and leveraging SIMD in particular is indeed one of the main focus points.

helloguo commented 6 years ago

Cool. You could find more details about types, semantics, usage, road map and so on from this issue https://github.com/dotnet/corefx/issues/22940. Note this will be a preview feature in .net core 2.1 (not included in default packages). Any suggestions/feedback are very welcome.

redknightlois commented 6 years ago

We implemented lots of POCs with Intrinsics at RavenDB. There are a few instructions that are not available yet for AVX/AVX2 (and won't be for 2.1 AFAIK), but the code generator for the ones that are there work pretty well.

uhensen commented 4 years ago

Is there any update since May 2018 or has this been parked since?

a1i3n37 commented 4 years ago

Another bump a few months later, any updates so far?

RossMMason commented 3 years ago

It would really be good to get some kind of update on this. Do we have any updates or plans?