Skip to content

Commit 65f6959

Browse files
committed
Enable Conditional Numerical Reproducibility for tests
1 parent fa62c81 commit 65f6959

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/Microsoft.ML.TestFramework/GlobalBase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public static void AssemblyInit()
2525
var prev = Contracts.SetAssertHandler(AssertHandler);
2626
Contracts.Check(prev == null, "Expected to replace null assertion handler!");
2727

28+
// Enable Conditional Numerical Reproducibility
29+
// https://software.intel.com/en-us/articles/introduction-to-the-conditional-numerical-reproducibility-cnr
30+
Environment.SetEnvironmentVariable("MKL_CBWR", "COMPATIBLE");
31+
2832
// HACK: ensure MklImports is loaded very early in the tests so it doesn't deadlock while loading it later.
2933
// See https://github.com/dotnet/machinelearning/issues/1073
3034
Mkl.PptrfInternal(Mkl.Layout.RowMajor, Mkl.UpLo.Up, 0, Array.Empty<double>());

0 commit comments

Comments
 (0)