Skip to content

Commit

Permalink
Cut down cblas.h to only the stuff we need, make this work on ILP64
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Apr 18, 2016
1 parent 0ec6dca commit 60c16e2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 553 deletions.
6 changes: 6 additions & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ if !libmxnet_detected

openblas_path = Libdl.dlpath(Libdl.dlopen(Base.libblas_name))

ilp64 = ""
if Base.blas_vendor() == :openblas64
ilp64 = "-DINTERFACE64"
end

#--------------------------------------------------------------------------------
# Build libmxnet
mxnet = library_dependency("mxnet", aliases=["libmxnet", "libmxnet.so"])
Expand All @@ -51,6 +56,7 @@ if !libmxnet_detected
`cp make/config.mk config.mk`
@osx_only `cp make/osx.mk config.mk`
`sed -i -s 's/USE_OPENCV = 1/USE_OPENCV = 0/' config.mk`
`sed -i -s "s/MSHADOW_CFLAGS = \(.*\)/MSHADOW_CFLAGS = \1 $ilp64/" mshadow/make/mshadow.mk`
`cp ../../cblas.h include/cblas.h`
`make USE_BLAS=openblas MSHADOW_LDFLAGS="$openblas_path" -j`
`cp lib/libmxnet.so $_libdir`
Expand Down
Loading

0 comments on commit 60c16e2

Please sign in to comment.