Skip to content

Commit

Permalink
- Updated documentation and nuspec file for creating the mkl nuget file,
Browse files Browse the repository at this point in the history
now includes openmp library file.
- Licensing is now shipped as part of the nuget file. Updated the nuspec
file to refer to the licensing file as opposed to the licensing url.

This is part of dotnet#2211
  • Loading branch information
singlis committed Feb 10, 2019
1 parent b3345f7 commit 73f4a21
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 16 deletions.
13 changes: 9 additions & 4 deletions docs/building/MlNetMklDeps/MlNetMklDeps.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata>
<id>MlNetMklDeps</id>
<version>0.0.0.7</version>
<version>0.0.0.8</version>
<title>This NuGet package provides Intel(R) MKL dependencies for ML.NET</title>
<authors>Intel Corporation</authors>
<owners>Microsoft</owners>
<projectUrl>https://dot.net/ml</projectUrl>
<licenseUrl>https://software.intel.com/en-us/license/intel-simplified-software-license</licenseUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>
Intel(R) MKL Dependencies for Microsoft ML.NET.
</description>
<copyright>Copyright (c) 2018 Intel Corporation.</copyright>
<copyright>Copyright (c) 2019 Intel Corporation.</copyright>
<tags>ML.Net Mkl Deps</tags>
<license type="file">license.txt</license>
</metadata>
</package>
<files>
<file src="licensing\license.txt" target="" />
<file src="licensing\third-party-programs.txt" target="" />
<file src="runtimes\**" target="runtimes" />
</files>
</package>
38 changes: 27 additions & 11 deletions docs/building/MlNetMklDeps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,47 @@ Windows (32 and 64 bit):
- Open an admin command prompt and run the following commands, CAREFULLY INSPECTING THE COMMAND OUTPUT FOR ERRORS.
- TLCROOT should be the root of your TLC_Resources folder.

Directory layout for nuget file is as follows:
* licensing (contains Intel's license.txt they ship MKL with along with any third party licenses)
* runtimes
** linux-x64
*** native (contains linux binaries)
** osx-x64
*** native (cntains osx binaries)
** win-x64
*** native (contains windows x64 binaries)
** win-x86
*** native (contains windows ia32 binaries)

##Windows
1. Modify user_example_list file in directory to contain all required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file
2. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
3. nmake libia32 name=MklImports (add threading=sequential if you are building without openmp)
4. copy /Y Microsoft.ML.MklImports.* to the folder that will host the x86 binaries.
5. del Microsoft.ML.MklImports.*
6. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
7. nmake intel64 name=MklImports (add threading=sequential if you are building without openmp)
8. copy /Y Microsoft.ML.MklImports.* to the folder that will host the x64 binaries.
1. In the Intel install directory, go to compilers_and_libraries\windows\mkl\tools\builder
2. Modify user_example_list file in directory to contain all required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file
3. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
4. nmake libia32 name=MklImports (add threading=sequential if you are building without openmp)
5. Copy MKL library: copy /Y MklImports.* to the folder that will host the x86 binaries.
6. Copy openmp library: copy /Y ..\..\..\redist\ia32_win\compiler\libiomp5md* to the folder for x86 binaries.
7. del MklImports.*
8. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
9. nmake intel64 name=MklImports (add threading=sequential if you are building without openmp)
10. Copy mkl library: copy /Y MklImports.* to the folder that will host the x64 binaries.
11. Copy openmp library: copy /Y ..\..\..\redist\intel64_win\compiler\libiomp5md* to the folder for x86 binaries.

##Linux
1. untar the linux sdk (tar -zxvf name_of_downloaded_file)
2. Run installation script and follow the instuctions in the dialog screens that are presented ./install.sh
3. Go to /opt/mkl/tools/builder.
3. Go to /opt/intel/mkl/tools/builder.
4. Modify makefile add -Wl,-rpath,'$$ORIGIN' \ -Wl,-z,origin \ after -Wl,--end-group \
5. Modify user_example_list file in directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file
6. Run make intel64 name=libMklImports (add threading=sequential if you are building without openmp)
7. Copy libMklImports.so the folder containing the Linux binaries.
8. Copy ../../../compilers_and_libraries/linux/compiler/lib/intel64_lin/libiomp5.so to the folder containing Linux binaries.

##OSX
1. extract and install the dmg (double-click and drag it in the Applications folder)
2. Go to /opt/mkl/tools/builder.
3. Modify user_example_list file in directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file
4. Run make intel64 name=libMklImports (add threading=sequential if you are building without openmp)
4. Run make libintel64 name=libMklImports (add threading=sequential if you are building without openmp)
5. Copy libMklImports.dylib from the builder directory to the folder containign the OSX binaries.
6. Fix the id and the rpath running the following commands:
sudo install_name_tool -id "@loader_path/libMklImports.dylib" libMklImports.dylib
sudo install_name_tool -id "@rpath/libMklImports.dylib" libMklImports.dylib
sudo install_name_tool -id "@rpath/libMklImports.dylib" libMklImports.dylib
8 changes: 7 additions & 1 deletion docs/building/MlNetMklDeps/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ mac: mkl 2018 update 1
##Exact versions, including minors
mac: 2018.1.126
linux: 2018.3.222
windows: 2018.3.210
windows: 2018.3.210

#Intel MKl SDK versions used to build the MlNetMklDeps v0.0.0.8
mkl 2019 Update 2
mac:2019.2.187
linux:2019.2.187
windows:2019.2.187

0 comments on commit 73f4a21

Please sign in to comment.