public static void AssemblyInit()
        {
            System.Diagnostics.Debug.WriteLine("*** Setting test assertion handler");
            var prev = Contracts.SetAssertHandler(AssertHandler);

            Contracts.Check(prev == null, "Expected to replace null assertion handler!");

            // HACK: ensure MklImports is loaded very early in the tests so it doesn't deadlock while loading it later.
            // See https://github.com/dotnet/machinelearning/issues/1073
            Mkl.PptrfInternal(Mkl.Layout.RowMajor, Mkl.UpLo.Up, 0, Array.Empty <double>());
        }
        public static void AssemblyInit()
        {
            System.Diagnostics.Debug.WriteLine("*** Setting test assertion handler");
            var prev = Contracts.SetAssertHandler(AssertHandler);

            Contracts.Check(prev == null, "Expected to replace null assertion handler!");

            // Enable Conditional Numerical Reproducibility
            // https://software.intel.com/en-us/articles/introduction-to-the-conditional-numerical-reproducibility-cnr
            Environment.SetEnvironmentVariable("MKL_CBWR", "COMPATIBLE");

            // HACK: ensure MklImports is loaded very early in the tests so it doesn't deadlock while loading it later.
            // See https://github.com/dotnet/machinelearning/issues/1073
            Mkl.PptrfInternal(Mkl.Layout.RowMajor, Mkl.UpLo.Up, 0, Array.Empty <double>());
        }
示例#3
0
 public void TestScikitAPI_MKL()
 {
     try
     {
         Mkl.PptrfInternal(Mkl.Layout.ColMajor, Mkl.UpLo.Lo, 2, new double[] { 0.1, 0.3 });
     }
     catch (DllNotFoundException e)
     {
         var os = Environment.OSVersion;
         if (os.Platform == PlatformID.Unix)
         {
             Console.WriteLine("FAIL: TestScikitAPI_MKL due to {0}", e.ToString());
         }
         else
         {
             Console.WriteLine("FAIL: TestScikitAPI_MKL, OS={0}", os.ToString());
             throw e;
         }
     }
 }
示例#4
0
 public void TestScikitAPI_MKL()
 {
     Mkl.PptrfInternal(Mkl.Layout.ColMajor, Mkl.UpLo.Lo, 2, new double[] { 0.1, 0.3 });
 }