boFFeL
boFFeL

Reputation: 31

System.Numerics.Vectors IsHardwareAccelerated returns false

I currently working on a project which switched from MathNet.Numerics library to the System.Numerics.Vectors library. I want to make use of the SIMD hardware support.

The target framework of the application is .NET 4.6.1 so RyuJIT should be the default JIT compiler. UseRyuJIT is set to 1 in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework.

But the System.Numerics.Vector.IsHardwareAccelerated property still returns false.

The application runs in Release mode, Prefer 32-Bit is unchecked, Platform target is AnyCPU (though I also tried x64), enable native code debugging is checked and when i run it from Visual Studio and watch the Debug -> Windows -> Modules window I can see the clrjit.dll in the list. No protojit.dll (I think this was the CTP versions name) or compatjit.dll is active.

Furthermore there is no useLegacyJit enabled="1" set in the app config, no COMPLUS_useLegacyJit environment variable or a useLegacyJit flag in the regedit.

System information:

Windows 7 Professional

Visual Studio Professional 2013

System.Numerics.Vectors v4.1.2.0

Intel Core i7 3740QM

Upvotes: 0

Views: 669

Answers (1)

Andy Ayers
Andy Ayers

Reputation: 1112

When you launch applications from Visual Studio the default setting, even for release builds, will disable jit optimizations, and that also disables SIMD code generation.

You can change this within VS, by navigating to Tools | Options | Debugging | General and unchecking "Suppress JIT optimization on module load (Managed Only)".

VS Debugger Options Dialog

Upvotes: 1

Related Questions