Is there still any development on SIMD in Mono?
Asked Answered
S

2

9

I want to know if there has been/is any development on Mono.SIMD (or SIMD-support in general inside Mono) ever since it came out 5(!) years ago. I personally think this was a great step in improving speed for c#. However, I've used it for some time now and I'm feeling that Mono.SIMD is falling behind, as lots of functions are missing.

Some of the problems i'm facing include:

  1. The lack of a dot product, which can be implemented in 1 operation ever since SSE4.1 (which came out in 2006 and is now supported on 70% of the computers), while it takes 3 operations inside Mono.SIMD. In addition to this, the programmer has to write a function for every version of SSE, a job the JIT should do (since it is created specifically to let the programmer stop worrying about CPU-versions).
  2. No possibility of adding/multiplying Vector4f and Vector4i (or any other vectors that are different).
  3. No proper casting of vectors (the bits don't seem change at all, so the results are very strange and almost entirely useless).
  4. Lots of other function which are not included, such as rounding.

So, does anyone know if something is happening with Mono.SIMD or SIMD-support in general(and if so, what)? Or, alternatively, does anyone know a good solution for any of the problems mentioned?

Shulock answered 22/10, 2013 at 13:22 Comment(2)
Dot product instruction in SSE4.1 is nearly useless. On Intel CPUs it decodes to 4 microoperations (in single precision version), and on recent AMD CPUs this instruction is microcoded. I've never seen any code (even a synthetic benchmark) which benefits from this instruction.Unless
In .Net framework 4.6 and 4.5 (System.Numerics for vector ops), and since RyuJIT with Microsoft.Bcl.Simd, SIMD is now natively supported by .Net. This will maybe encourage Mono team to follow the lead ?Superhuman
N
4

AFAIR the development is not in progress. The project is open source and the machinery is not too complicated, so one can improve current implementation. I considered adding some instructions, but then, as usual, there was not enough time to do that (also the application was eventually canceled). You may be interested in looking at the thread: http://lists.ximian.com/pipermail/mono-devel-list/2012-February/038632.html

Nipha answered 22/10, 2013 at 15:18 Comment(0)
B
3

The other answer was made a few years ago. Thus, I wrote this one to list all the necessary bits for 2018 readers.

When Mono started to support SIMD, they were requested by Unity guys,

http://tirania.org/blog/archive/2008/Nov-03.html

It seemed to be in a hurry, so the overall API design still has room to grow.

Microsoft started to work on a more complete and standardized SIMD enabled library, and that was a few years later in 2014,

https://www.infoq.com/news/2014/04/SIMD-CLR

Therefore, attention should be paid to this newer option.

Microsoft open sourced .NET Core in 2015, and since then the SIMD work has been accelerated.

It was in last year that Mono 5.0 announced the obsoleteness of Mono.SIMD in favor of Microsoft's work,

http://www.mono-project.com/docs/about-mono/releases/5.0.0/ (SIMD Acceleration support section).

Banter answered 5/1, 2018 at 1:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.