-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Port SymSGD #556
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
Closed
Closed
Port SymSGD #556
Changes from all commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
8cdbf0f
Initial commit plus use ITrainer that returns predictor in SymSGD.
codemzs ca13e8d
Add tests.
codemzs 7934cd5
Allow CpuMath to reference C# Hardware Intrinsics APIs. (#542)
eerhardt d456552
PipelineSweeperMacro for Multi-Class Classification (#539)
abgoswam ffeb1c9
Ensure ONNX export is compatible with Windows RS5 (#550)
codemzs 91eb4fd
Move Windows and Linux CI to VSTS (#566)
safern e04a28f
Fix Linux CI to actually run inside a docker container (#574)
safern 02a0a6d
Don't fail in case of const field in Collection source and extended s…
Ivanidzo4ka 5287ce8
Schema comprehension doc (#572)
Zruty0 e5d90fe
Initial code analyzer for Microsoft.ML, use limited StyleCop (#557)
TomFinley cfd8caa
Sweep Range of L2RegularizerWeight in AveragedPerceptron (#579)
SolyarA 40f128f
PR feedback.:
codemzs 320f167
Fixed the TextTransform bug where chargrams where being computed diff…
zeahmed 200ac53
Pass fold index to cross validation metrics. (#575)
Ivanidzo4ka c3730a0
Add reference to MKL nuget.
codemzs 22224ec
Fixes #591: typos, adding the type attribute to lists, and moving the…
sfilipi cc194a4
openmp flag for linux and os x
codemzs 8e3af20
openmp flag for linux and os x
codemzs 45aaa9a
openmp flag for linux and os x
codemzs 303f463
openmp flag for linux and os x
codemzs a332312
openmp flag for linux and os x
codemzs 8378afd
openmp flag for linux and os x
codemzs edbcef4
openmp flag for linux and os x
codemzs 5d4d119
openmp flag for linux and os x
codemzs 5413530
openmp flag for linux and os x
codemzs bea513e
openmp flag for linux and os x
codemzs c515ac6
openmp flag for linux and os x
codemzs 87c3f57
openmp flag for linux and os x
codemzs a5907db
openmp flag for linux and os x
codemzs a279a9f
openmp flag for linux and os x
codemzs c442145
openmp flag for linux and os x
codemzs 8f139c3
openmp flag for linux and os x
codemzs 434b60e
openmp flag for linux and os x
codemzs 6dabc51
remove openmp dependency.
codemzs e0e8114
openmp flag for linux and os x
codemzs 864d94e
openmp flag for linux and os x
codemzs 956f425
fix deletion of void* in native code.
codemzs 1cde6ae
fix deletion of void* in native code.
codemzs 8bc6833
fix deletion of void* in native code.
codemzs 3a78e09
fix deletion of void* in native code.
codemzs 1c4cd7a
fix deletion of void* in native code.
codemzs c46dd0d
Replace openmp constructs with c++11 threading routines.
codemzs c414029
Replace openmp constructs with c++11 threading routines.
codemzs accb42a
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs a9d1a26
Replace openmp constructs with c++11 threading routines.
codemzs 7255613
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 037c7ee
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 4965c24
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs f01d542
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 82d9a8d
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 1e03fe9
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 43f9a8c
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 1510520
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 9a99493
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 8e13400
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs d890c63
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 874867c
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 7fd9199
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 5a1808f
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs a761faa
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs fe5ffb1
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs f57233e
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs b366efb
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 09685ff
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs bf54d18
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs f79cde7
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 7e9ad36
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 12940bf
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs 1583494
Rename mkl binaries from dll to .so for linux and .dylib for macOS.
codemzs c1993d6
changes.
codemzs 760cef2
Fix creation of dataviews inferred with .NET types with sparse vector…
xadupre 884574d
adding a dependency to the MlNEtMklDeps package (#594)
sfilipi e428c1c
changes.
codemzs a187a9e
make symsgd single threaded.
codemzs cd361a2
tests.
codemzs 8903d02
cmake stuff.
codemzs 7687cd4
cmake fix.
codemzs 4821a1b
cmake stuff.
codemzs ee813b6
upgrade to mkl nuget 0.0.0.4
codemzs c758a81
upgrade to mkl nuget 0.0.0.4
codemzs 8f7e497
load mkl native before symSGD is loaded.
codemzs 5667701
load mkl native before symSGD is loaded.
codemzs e830980
load mkl native before symSGD is loaded.
codemzs bc87d62
support validation and incremental trainers (#610)
Ivanidzo4ka 966b0f3
Add needed param to warning for L2 in SDCA (#597)
justinormont 52d96b4
word embedding transform (#545)
Ivanidzo4ka 2cb7dc6
Image support (#528)
Ivanidzo4ka 767800c
load mkl native before symSGD is loaded.
codemzs 89c06c0
load mkl native before symSGD is loaded.
codemzs 41cba77
fixes.
codemzs 4b27ec8
Rpath for linux and os x.
codemzs be8c6c8
Rpath for linux and os x.
codemzs 6fe7e1a
Rpath for linux and os x.
codemzs 2d8c15b
load mkl native before symSGD is loaded.
codemzs 20b448b
Splitting OLS to a separate package called AdditionalLearners (#611)
sfilipi b9fe01d
Rpath for linux and os x.
codemzs ebd5bcd
Rpath for OS X
codemzs de999a8
Rpath for linux and os x.
codemzs 573781d
Rpath for linux and os x.
codemzs 9d8f297
Rpath for linux and os x.
codemzs 1b4273a
Rpath for linux and os x.
codemzs 294c3d7
move symsgd under HALLearners.
codemzs 6ec9d70
documentation.
codemzs 65c97f1
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
codemzs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
850 changes: 850 additions & 0 deletions
850
src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
project (SymSgdNative) | ||
|
||
set(SOURCES | ||
SymSgdNative.cpp | ||
) | ||
|
||
if(WIN32) | ||
find_library(MKL_LIBRARY MklImports HINTS ${CMAKE_SOURCE_DIR}/../../packages/mlnetmkldeps/0.0.0.5/runtimes/win-x64/native) | ||
else() | ||
list(APPEND SOURCES ${VERSION_FILE_PATH}) | ||
if(CMAKE_SYSTEM_NAME STREQUAL Darwin) | ||
message("Linking SymSgdNative with MKL on macOS.") | ||
find_library(MKL_LIBRARY libMklImports.dylib HINTS "${CMAKE_SOURCE_DIR}/../../packages/mlnetmkldeps/0.0.0.5/runtimes/osx-x64/native") | ||
else() | ||
message("Linking SymSgdNative with MKL on linux.") | ||
find_library(MKL_LIBRARY libMklImports.so HINTS ${CMAKE_SOURCE_DIR}/../../packages/mlnetmkldeps/0.0.0.5/runtimes/linux-x64/native) | ||
SET(CMAKE_SKIP_BUILD_RPATH FALSE) | ||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) | ||
SET(CMAKE_INSTALL_RPATH "${CMAKE_SOURCE_DIR}/../../packages/mlnetmkldeps/0.0.0.5/runtimes") | ||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | ||
SET(CMAKE_INSTALL_RPATH "${CMAKE_SOURCE_DIR}/../../packages/mlnetmkldeps/0.0.0.5/runtimes") | ||
endif() | ||
endif() | ||
|
||
add_library(SymSgdNative SHARED ${SOURCES} ${RESOURCES}) | ||
target_link_libraries(SymSgdNative PUBLIC ${MKL_LIBRARY}) | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL Darwin) | ||
set_target_properties(SymSgdNative PROPERTIES INSTALL_RPATH "${CMAKE_SOURCE_DIR}/../../packages/mlnetmkldeps/0.0.0.5/runtimes/osx-x64/native") | ||
endif() | ||
|
||
install_library_and_symbols (SymSgdNative) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
#pragma once | ||
#define MIN(__X__, __Y__) (((__X__) > (__Y__)) ? (__Y__) : (__X__)) | ||
|
||
// This is a very large prime number used for permutation | ||
#define VERYLARGEPRIME 961748941 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
#pragma once | ||
#include "../Stdafx.h" | ||
|
||
extern "C" float cblas_sdot(const int vecSize, const float* denseVecX, const int incX, const float* denseVecY, const int incY); | ||
extern "C" float cblas_sdoti(const int sparseVecSize, const float* sparseVecValues, const int* sparseVecIndices, float* denseVec); | ||
extern "C" void cblas_saxpy(const int vecSize, const float coef, const float* denseVecX, const int incX, float* denseVecY, const int incY); | ||
extern "C" void cblas_saxpyi(const int sparseVecSize, const float coef, const float* sparseVecValues, const int* sparseVecIndices, float* denseVec); | ||
|
||
float SDOT(const int vecSize, const float* denseVecX, const float* denseVecY) { | ||
return cblas_sdot(vecSize, denseVecX, 1, denseVecY, 1); | ||
} | ||
|
||
float SDOTI(const int sparseVecSize, const int* sparseVecIndices, const float* sparseVecValues, float* denseVec) { | ||
return cblas_sdoti(sparseVecSize, sparseVecValues, sparseVecIndices, denseVec); | ||
} | ||
|
||
void SAXPY(const int vecSize, const float* denseVecX, float* denseVecY, float coef) { | ||
return cblas_saxpy(vecSize, coef, denseVecX, 1, denseVecY, 1); | ||
} | ||
|
||
void SAXPYI(const int sparseVecSize, const int* sparseVecIndices, const float* sparseVecValues, float* denseVec, float coef) { | ||
cblas_saxpyi(sparseVecSize, coef, sparseVecValues, sparseVecIndices, denseVec); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Not sure how much documentation we have about SymSGD. If any, might be nice to include it.
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.
Done.