Skip to content

Commit a9d8ae4

Browse files
authored
adding the functions used to build MlNetMklDeps for 0.0.0.6 (#1182)
* adding the functions used to build MlNetMklDeps, and the version used for 0.0.0.6 * resolving @eerhardt suggestions
1 parent e54e83e commit a9d8ae4

File tree

4 files changed

+148
-0
lines changed

4 files changed

+148
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
3+
<metadata>
4+
<id>MlNetMklDeps</id>
5+
<version>0.0.0.6</version>
6+
<title>This NuGet package provides Intel(R) MKL dependencies for ML.NET</title>
7+
<authors>Intel Corporation</authors>
8+
<owners>Microsoft</owners>
9+
<projectUrl>https://dot.net/ml</projectUrl>
10+
<licenseUrl>https://software.intel.com/en-us/license/intel-simplified-software-license</licenseUrl>
11+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
12+
<description>
13+
Intel(R) MKL Dependencies for Microsoft ML.NET.
14+
</description>
15+
<copyright>Copyright (c) 2018 Intel Corporation.</copyright>
16+
<tags>ML.Net Mkl Deps</tags>
17+
</metadata>
18+
</package>

docs/building/MlNetMklDeps/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#Instructions to build a custom DLL from Intel's MKL SDK
2+
ML.NET MKL implementation uses Intel MKL Custom DLL builder to produce a single DLL which contains all of the MKL functions used by it.
3+
To update the DLL, follow the steps below:
4+
5+
Windows (32 and 64 bit):
6+
- Ensure you have Intel's MKL SDK installed, you can find it here: https://software.intel.com/en-us/mkl.
7+
- Open an admin command prompt and run the following commands, CAREFULLY INSPECTING THE COMMAND OUTPUT FOR ERRORS.
8+
- TLCROOT should be the root of your TLC_Resources folder.
9+
10+
##Windows
11+
1. Modify user_example_list file in directory to contain all required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file
12+
2. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
13+
3. nmake libia32 name=MklImports (add threading=sequential if you are building without openmp)
14+
4. copy /Y Microsoft.ML.MklImports.* to the folder that will host the x86 binaries.
15+
5. del Microsoft.ML.MklImports.*
16+
6. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
17+
7. nmake intel64 name=MklImports (add threading=sequential if you are building without openmp)
18+
8. copy /Y Microsoft.ML.MklImports.* to the folder that will host the x64 binaries.
19+
20+
##Linux
21+
1. untar the linux sdk (tar -zxvf name_of_downloaded_file)
22+
2. Run installation script and follow the instuctions in the dialog screens that are presented ./install.sh
23+
3. Go to /opt/mkl/tools/builder.
24+
4. Modify makefile add -Wl,-rpath,'$$ORIGIN' \ -Wl,-z,origin \ after -Wl,--end-group \
25+
5. Modify user_example_list file in directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file
26+
6. Run make intel64 name=libMklImports (add threading=sequential if you are building without openmp)
27+
7. Copy libMklImports.so the folder containing the Linux binaries.
28+
29+
##OSX
30+
1. extract and install the dmg (double-click and drag it in the Applications folder)
31+
2. Go to /opt/mkl/tools/builder.
32+
3. Modify user_example_list file in directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file
33+
4. Run make intel64 name=libMklImports (add threading=sequential if you are building without openmp)
34+
5. Copy libMklImports.dylib from the builder directory to the folder containign the OSX binaries.
35+
6. Fix the id and the rpath running the following commands:
36+
sudo install_name_tool -id "@loader_path/libMklImports.dylib" libMklImports.dylib
37+
sudo install_name_tool -id "@rpath/libMklImports.dylib" libMklImports.dylib
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
; MKL custom dll built for ML.NET
2+
; Note that function names are case-sensitive, for example, you must specify LAPACKE_sgesvd rather than lapacke_sgesvd.
3+
4+
;---- CBLAS ----
5+
cblas_sdot
6+
cblas_sdoti
7+
8+
cblas_sasum
9+
cblas_snrm2
10+
cblas_scopy
11+
cblas_isamin
12+
cblas_isamax
13+
14+
cblas_ssymv
15+
cblas_saxpy
16+
cblas_saxpyi
17+
cblas_daxpy
18+
cblas_sscal
19+
cblas_dscal
20+
21+
cblas_sger
22+
cblas_dger
23+
cblas_sgemv
24+
cblas_dgemv
25+
26+
cblas_sgemm
27+
cblas_dgemm
28+
29+
mkl_sdnscsr
30+
mkl_scsrmv
31+
mkl_dcsrmv
32+
mkl_scsrmm
33+
mkl_dcsrmm
34+
mkl_scscmm
35+
mkl_scsrcsc
36+
mkl_cspblas_scsrgemv
37+
38+
MKL_Simatcopy
39+
MKL_Dimatcopy
40+
MKL_Somatcopy
41+
MKL_Domatcopy
42+
43+
LAPACKE_sgesvd
44+
LAPACKE_dgesvd
45+
46+
LAPACKE_dpptrf
47+
LAPACKE_dpptri
48+
LAPACKE_dpptrs
49+
50+
;---- VML -----
51+
vsAbs
52+
vdAbs
53+
vsAdd
54+
vdAdd
55+
vsTanh
56+
vdTanh
57+
vsExp
58+
vdExp
59+
vsMul
60+
vdMul
61+
vsSqr
62+
vdSqr
63+
vsSqrt
64+
vdSqrt
65+
66+
;---- RNG ----
67+
vslNewStream
68+
vslDeleteStream
69+
vdRngUniform
70+
vsRngUniform
71+
72+
;---- FOURIER ----
73+
DftiCreateDescriptor
74+
DftiSetValue
75+
DftiGetValue
76+
DftiCommitDescriptor
77+
78+
DftiComputeForward
79+
DftiComputeBackward
80+
81+
DftiFreeDescriptor
82+
DftiErrorClass
83+
DftiErrorMessage

docs/building/MlNetMklDeps/version.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#Intel MKl SDK versions used to build the MlNetMklDeps v0.0.0.4-0.0.0.6
2+
3+
##Sdk Version
4+
linux and windows: mkl 2018 update 3
5+
mac: mkl 2018 update 1
6+
7+
##Exact versions, including minors
8+
mac: 2018.1.126
9+
linux: 2018.3.222
10+
windows: 2018.3.210

0 commit comments

Comments
 (0)