Browse Source

Native: MKL: increment linear argebra major version due to breaking change

regarding work array handling.
truncatednormal
Christoph Ruegg 11 years ago
parent
commit
69520be5b5
  1. 24
      MathNet.Numerics.NativeProviders.sln
  2. 3
      src/NativeProviders/CUDA/capabilities.cpp
  3. 5
      src/NativeProviders/MKL/capabilities.cpp
  4. 3
      src/NativeProviders/OpenBLAS/capabilities.cpp
  5. 10
      src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs
  6. 1
      src/Numerics/Providers/LinearAlgebra/Mkl/MklProviderCapabilities.cs

24
MathNet.Numerics.NativeProviders.sln

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013 # Visual Studio 14
VisualStudioVersion = 12.0.31101.0 VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{5A0892FF-82CE-40FC-BCE1-73810C615F52}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{5A0892FF-82CE-40FC-BCE1-73810C615F52}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
@ -28,6 +28,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests-OpenBLAS", "src\U
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestData", "src\TestData\TestData.csproj", "{AF3253C9-4DB5-45A0-98CF-C105FDA9DA47}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestData", "src\TestData\TestData.csproj", "{AF3253C9-4DB5-45A0-98CF-C105FDA9DA47}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Readme", "Readme", "{77CF160D-3AE0-45A2-8224-6322C28C2685}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
RELEASENOTES-CUDA.md = RELEASENOTES-CUDA.md
RELEASENOTES-MKL.md = RELEASENOTES-MKL.md
RELEASENOTES-OpenBLAS.md = RELEASENOTES-OpenBLAS.md
RELEASENOTES.md = RELEASENOTES.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{9275D8F1-84B4-404F-AC1F-EE1211C9F744}"
ProjectSection(SolutionItems) = preProject
docs\content\Build.md = docs\content\Build.md
docs\content\Compatibility.md = docs\content\Compatibility.md
docs\content\Contributing.md = docs\content\Contributing.md
docs\content\Contributors.md = docs\content\Contributors.md
docs\content\License.md = docs\content\License.md
docs\content\MKL.md = docs\content\MKL.md
docs\content\Packages.md = docs\content\Packages.md
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU

3
src/NativeProviders/CUDA/capabilities.cpp

@ -45,7 +45,8 @@ extern "C" {
case 64: return 1; // revision case 64: return 1; // revision
// LINEAR ALGEBRA // LINEAR ALGEBRA
case 128: return 1; // basic dense linear algebra case 128: return 1; // basic dense linear algebra (major - breaking)
case 129: return 0; // basic dense linear algebra (minor - non-breaking)
// OPTIMIZATION // OPTIMIZATION
case 256: return 0; // basic optimization case 256: return 0; // basic optimization

5
src/NativeProviders/MKL/capabilities.cpp

@ -41,13 +41,14 @@ extern "C" {
#endif #endif
// COMMON/SHARED // COMMON/SHARED
case 64: return 8; // revision case 64: return 9; // revision
case 65: return 1; // numerical consistency, precision and accuracy modes case 65: return 1; // numerical consistency, precision and accuracy modes
case 66: return 1; // threading control case 66: return 1; // threading control
case 67: return 1; // memory management case 67: return 1; // memory management
// LINEAR ALGEBRA // LINEAR ALGEBRA
case 128: return 1; // basic dense linear algebra case 128: return 2; // basic dense linear algebra (major - breaking)
case 129: return 0; // basic dense linear algebra (minor - non-breaking)
// OPTIMIZATION // OPTIMIZATION
case 256: return 0; // basic optimization case 256: return 0; // basic optimization

3
src/NativeProviders/OpenBLAS/capabilities.cpp

@ -45,7 +45,8 @@ extern "C" {
case 66: return 1; // threading control case 66: return 1; // threading control
// LINEAR ALGEBRA // LINEAR ALGEBRA
case 128: return 1; // basic dense linear algebra case 128: return 1; // basic dense linear algebra (major - breaking)
case 129: return 0; // basic dense linear algebra (minor - non-breaking)
default: return 0; // unknown or not supported default: return 0; // unknown or not supported

10
src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs

@ -174,9 +174,15 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Mkl
throw new NotSupportedException("MKL Native Provider does not support capability querying and is therefore not compatible. Consider upgrading to a newer version.", e); throw new NotSupportedException("MKL Native Provider does not support capability querying and is therefore not compatible. Consider upgrading to a newer version.", e);
} }
if (a != 0 || b != -1 || linearAlgebra <=0 || _nativeRevision < 4) if (a != 0 || b != -1 || _nativeRevision < 4)
{ {
throw new NotSupportedException("MKL Native Provider too old or not compatible. Consider upgrading to a newer version."); throw new NotSupportedException("MKL Native Provider too old. Consider upgrading to a newer version.");
}
// we only support exactly one major version, since major version changes imply a breaking change.
if (linearAlgebra != 2)
{
throw new NotSupportedException(string.Format("MKL Native Provider not compatible. Expecting linear algebra v2 but provider implements v{0}.", linearAlgebra));
} }
// set numerical consistency, precision and accuracy modes, if supported // set numerical consistency, precision and accuracy modes, if supported

1
src/Numerics/Providers/LinearAlgebra/Mkl/MklProviderCapabilities.cs

@ -48,5 +48,6 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Mkl
internal enum ProviderCapability : int internal enum ProviderCapability : int
{ {
LinearAlgebra = 128, LinearAlgebra = 128,
LinearAlgebraMinor = 129,
} }
} }

Loading…
Cancel
Save