few changes for openblas and jcpp preloads (on macos) (#46)
Signed-off-by: raver119 <raver119@gmail.com>master
parent
1eb3de90d7
commit
c5b912bddf
|
@ -84,13 +84,6 @@ public class CpuNDArrayFactory extends BaseNativeNDArrayFactory {
|
|||
|
||||
@Override
|
||||
public void createBlas() {
|
||||
String lib = System.getProperty(ND4JSystemProperties.ND4J_CPU_LOAD_OPENBLAS,
|
||||
System.getProperty(ND4JSystemProperties.ND4J_CPU_LOAD_OPENBLAS_NOLAPACK, "")).toLowerCase();
|
||||
if (lib.trim().length() == 0) {
|
||||
// try to load by default the LAPACK-less version of MKL bundled with MKL-DNN
|
||||
System.setProperty(ND4JSystemProperties.ND4J_CPU_LOAD_OPENBLAS_NOLAPACK, "mklml");
|
||||
}
|
||||
|
||||
// we'll check hardware support first
|
||||
if (!nativeOps.isMinimalRequirementsMet()) {
|
||||
// this means cpu binary was built for some arch support, we don't have on this box
|
||||
|
|
|
@ -130,18 +130,12 @@ import java.util.Scanner;
|
|||
compiler = {"cpp11", "nowarnings"}, library = "jnind4jcpu", link = "nd4jcpu",
|
||||
preloadresource = {"org/bytedeco/openblas/"},
|
||||
preload = {"openblas", "openblas_nolapack", "libnd4jcpu"}),
|
||||
@Platform(value = "linux", preload = {"gomp@.1"},
|
||||
preloadpath = {"/lib64/", "/lib/", "/usr/lib64/", "/usr/lib/"}),
|
||||
@Platform(value = {"linux-arm", "linux-ppc"},
|
||||
preload = {"gomp@.1", "gcc_s@.1", "quadmath@.0", "gfortran@.5", "gfortran@.4", "gfortran@.3", "openblas@.0", "libnd4jcpu"}),
|
||||
@Platform(value = "linux", preload = {"gomp@.1"}, preloadpath = {"/lib64/", "/lib/", "/usr/lib64/", "/usr/lib/"}),
|
||||
@Platform(value = {"linux-arm", "linux-ppc"}, preload = {"gomp@.1", "gcc_s@.1", "quadmath@.0", "gfortran@.5", "gfortran@.4", "gfortran@.3", "openblas@.0", "libnd4jcpu"}),
|
||||
@Platform(value = "linux-armhf", preloadpath = {"/usr/arm-linux-gnueabihf/lib/", "/usr/lib/arm-linux-gnueabihf/"}),
|
||||
@Platform(value = "linux-arm64", preloadpath = {"/usr/aarch64-linux-gnu/lib/", "/usr/lib/aarch64-linux-gnu/"}),
|
||||
@Platform(value = "linux-ppc64", preloadpath = {"/usr/powerpc64-linux-gnu/lib/", "/usr/powerpc64le-linux-gnu/lib/",
|
||||
"/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}),
|
||||
@Platform(value = "macosx", preload = {"gcc_s@.1", "gomp@.1", "stdc++@.6"},
|
||||
preloadpath = {"/usr/local/lib/gcc/8/", "/usr/local/lib/gcc/7/", "/usr/local/lib/gcc/6/", "/usr/local/lib/gcc/5/"}),
|
||||
@Platform(value = "windows", preload = {"libwinpthread-1", "libgcc_s_seh-1", "libgomp-1", "libstdc++-6",
|
||||
"msvcr120", "libnd4jcpu"}),
|
||||
@Platform(value = "linux-ppc64", preloadpath = {"/usr/powerpc64-linux-gnu/lib/", "/usr/powerpc64le-linux-gnu/lib/", "/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}),
|
||||
@Platform(value = "windows", preload = {"libwinpthread-1", "libgcc_s_seh-1", "libgomp-1", "libstdc++-6", "msvcr120", "libnd4jcpu"}),
|
||||
@Platform(extension = {"-avx512", "-avx2"}) })
|
||||
public class Nd4jCpuPresets implements InfoMapper, BuildEnabled {
|
||||
|
||||
|
|
Loading…
Reference in New Issue