-
Notifications
You must be signed in to change notification settings - Fork 1.9k
adding the functions used to build MlNetMklDeps for 0.0.0.6 #1182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd"> | ||
<metadata> | ||
<id>MlNetMklDeps</id> | ||
<version>0.0.0.6</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> | ||
<tags>ML.Net Mkl Deps</tags> | ||
</metadata> | ||
</package> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#Instructions to build a custom DLL from Intel's MKL SDK | ||
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. | ||
To update the DLL, follow the steps below: | ||
|
||
Windows (32 and 64 bit): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't call this windows specific if you remove last point from the list. |
||
- Ensure you have Intel's MKL SDK installed, you can find it here: https://software.intel.com/en-us/mkl. | ||
- 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is TLC? |
||
|
||
##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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Should be Microsoft.ML.MklImports |
||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be Microsoft.ML.MklImports |
||
8. copy /Y Microsoft.ML.MklImports.* to the folder that will host the x64 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. | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't it weird what we have x86 version for windows only :) #Resolved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is actually weird that we have instructions for x86 :) Thanks for taking a look @Ivanidzo4ka. I'll address those on the next PR that adds details about 0.0.0.7 In reply to: 223563064 [](ancestors = 223563064) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .NET only supports x86 on Windows. https://github.com/dotnet/core/blob/master/release-notes/2.1/2.1-supported-os.md |
||
7. Copy libMklImports.so the folder containing the 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) | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
; MKL custom dll built for ML.NET | ||
; Note that function names are case-sensitive, for example, you must specify LAPACKE_sgesvd rather than lapacke_sgesvd. | ||
|
||
;---- CBLAS ---- | ||
cblas_sdot | ||
cblas_sdoti | ||
|
||
cblas_sasum | ||
cblas_snrm2 | ||
cblas_scopy | ||
cblas_isamin | ||
cblas_isamax | ||
|
||
cblas_ssymv | ||
cblas_saxpy | ||
cblas_saxpyi | ||
cblas_daxpy | ||
cblas_sscal | ||
cblas_dscal | ||
|
||
cblas_sger | ||
cblas_dger | ||
cblas_sgemv | ||
cblas_dgemv | ||
|
||
cblas_sgemm | ||
cblas_dgemm | ||
|
||
mkl_sdnscsr | ||
mkl_scsrmv | ||
mkl_dcsrmv | ||
mkl_scsrmm | ||
mkl_dcsrmm | ||
mkl_scscmm | ||
mkl_scsrcsc | ||
mkl_cspblas_scsrgemv | ||
|
||
MKL_Simatcopy | ||
MKL_Dimatcopy | ||
MKL_Somatcopy | ||
MKL_Domatcopy | ||
|
||
LAPACKE_sgesvd | ||
LAPACKE_dgesvd | ||
|
||
LAPACKE_dpptrf | ||
LAPACKE_dpptri | ||
LAPACKE_dpptrs | ||
|
||
;---- VML ----- | ||
vsAbs | ||
vdAbs | ||
vsAdd | ||
vdAdd | ||
vsTanh | ||
vdTanh | ||
vsExp | ||
vdExp | ||
vsMul | ||
vdMul | ||
vsSqr | ||
vdSqr | ||
vsSqrt | ||
vdSqrt | ||
|
||
;---- RNG ---- | ||
vslNewStream | ||
vslDeleteStream | ||
vdRngUniform | ||
vsRngUniform | ||
|
||
;---- FOURIER ---- | ||
DftiCreateDescriptor | ||
DftiSetValue | ||
DftiGetValue | ||
DftiCommitDescriptor | ||
|
||
DftiComputeForward | ||
DftiComputeBackward | ||
|
||
DftiFreeDescriptor | ||
DftiErrorClass | ||
DftiErrorMessage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#Intel MKl SDK versions used to build the MlNetMklDeps v0.0.0.4-0.0.0.6 | ||
|
||
##Sdk Version | ||
linux and windows: mkl 2018 update 3 | ||
mac: mkl 2018 update 1 | ||
|
||
##Exact versions, including minors | ||
mac: 2018.1.126 | ||
linux: 2018.3.222 | ||
windows: 2018.3.210 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it would be a good idea to put a README in this directory as well? The README could have the instructions for how to build the package. Then it would all be out in the open, and we wouldn't have to go looking for the instructions. #Resolved