Skip to content

Commit

Permalink
[WIP] MKL-DNN directly wrapper for BigDL. (intel-analytics#55)
Browse files Browse the repository at this point in the history
* feat: mkl-dnn initialize

* fix: structure of building

* fix: public final static

* fix: delete the dependencies of environments

* fix: skip tests

* add update dnn wrappers

* fix: dynamic load iomp5

* feat linear supports and some fix

* add more wrapper

* add lrn api

* fix: add bn and softmax

* fix: some fixes

* fix: mkl-dnn build

* feat: add get format api

* fix: add getSize

* feat: aligned memory

* add conv fuse relu api

* fix: add aligned storage

* add concat api

* fix: mkl envs for lib mkldnn

* fix: add mkl add method with 2 ptrs

* fix: update to Release

* fix: batch norm infer mode

* fix: update 0.5.0 -> 0.6.0

* add free (intel-analytics#5)

* feat: affinity for java thread

* fix: update core branch

* fix: delete the memset constant value for debug, and add affinity

* feat: add mkl-dnn fusion

* fix: memory format enum consistent with dnn

* feat: add auto format

* refactor: delete the MemoryFormat in MklDnn

* Memory should load MKLDnn (intel-analytics#6)

* refactor: move enums to seprate classes (intel-analytics#7)

* feat: add GetShape and GetFormat api

* fix: delete printf

* fix a bug

* add sum

* refactor: change name

* refactor: change submodule infos

* fix: set block time by default. A property to control to disable it
  • Loading branch information
i8run committed Jun 28, 2018
1 parent c08d314 commit 1bc0908
Show file tree
Hide file tree
Showing 67 changed files with 3,818 additions and 2,283 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ target/
*.dylib
dependency-reduced-pom.xml
.idea/
.vscode/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "native-dnn/native"]
path = native-dnn/native
url = https://github.com/01org/mkl-dnn.git
5 changes: 5 additions & 0 deletions dist/dist-linux/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
<artifactId>opencv-java-x86_64-linux</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.intel.analytics.bigdl.core.native.dnn</groupId>
<artifactId>dnn-java-x86_64-linux</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@ public class MKL {
* + default value: true
*/
private static void setMklEnv() {
String disableStr = System.getProperty("bigdl.disable.mklBlockTime", "false");
boolean disable = Boolean.parseBoolean(disableStr);

setNumThreads(getMklNumThreads());
setBlockTime(getMklBlockTime());
if (!disable) {
setBlockTime(getMklBlockTime());
}
waitPolicy(getMklWaitPolicy());
if (getMklDisableFastMM()) {
disableFastMM();
Expand Down Expand Up @@ -180,7 +185,7 @@ public static String getTmpSoFilePath() {
* to directly use the system malloc/free functions.
* It's an substitute of environment variable: MKL_DISABLE_FAST_MM
*/
public native static void disableFastMM();
public native static int disableFastMM();

/**
* Sets the time (milliseconds) that a thread should wait before sleeping,
Expand Down

This file was deleted.

Loading

0 comments on commit 1bc0908

Please sign in to comment.