Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Julia v0.7/1.0 support and drop v0.6 support #12845

Merged
merged 111 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
b9a9e76
start working on updating to Julia v0.7/1.0
iblislin Oct 17, 2018
2dc36cf
ci: bump Julia version to 0.7
iblislin Oct 17, 2018
2ec8c38
using Printf
iblislin Oct 17, 2018
8f7a5ae
fix docstring depwarns
iblislin Oct 17, 2018
aee6ddb
base.jl: fix LIB_VERSION
iblislin Oct 17, 2018
f0a4d23
fix depwarns in base.jl
iblislin Oct 17, 2018
95bbef6
style suffs for context.jl
iblislin Oct 26, 2018
89535cf
context.jl: fix convert deprecation
iblislin Oct 27, 2018
03e8202
base.jl: QuoteNode and flipdim
iblislin Oct 27, 2018
9ec1fc4
ndarray: fix Base.show
iblislin Oct 27, 2018
a273617
ndarray: fix flipdim
iblislin Oct 27, 2018
b5abfcb
ndarray: fix Base.eltype
iblislin Oct 27, 2018
f14d31d
ndarray: Void -> Cvoid
iblislin Oct 27, 2018
156b9e9
ndarray: Base.size
iblislin Oct 27, 2018
059026f
Void -> Cvoid
iblislin Nov 11, 2018
4684957
start working on broadcasting
iblislin Nov 11, 2018
2c61a39
broadcasted add
iblislin Nov 11, 2018
367f0ee
broadcasted minus
iblislin Nov 11, 2018
2533903
broadcasted multiplication
iblislin Nov 11, 2018
05f552c
broadcasted div
iblislin Nov 11, 2018
ea45365
broadcasted mod
iblislin Nov 11, 2018
bef3d5b
broadcasted power
iblislin Nov 11, 2018
00cba83
broadcasted comparison, min, max, hypot
iblislin Nov 11, 2018
afa4ebe
utils: fix replace
iblislin Nov 12, 2018
2e046cb
broadcast: trigonometric and hyperbolic function
iblislin Nov 14, 2018
e382940
broadcast: activation functions
iblislin Nov 14, 2018
b1d0046
fix _remap import
iblislin Nov 14, 2018
fa8b4d3
fix import depwarns
iblislin Nov 15, 2018
197c7d9
ndarray: fix docstring depwarn
iblislin Nov 23, 2018
8915579
base: fix dump_mx_param
iblislin Nov 23, 2018
c0b0693
random: srand -> seed!
iblislin Nov 23, 2018
531f100
import
iblislin Nov 30, 2018
88d11a9
include broadcast.jl
iblislin Nov 30, 2018
7a6760a
fix depwarn in autograd
iblislin Nov 30, 2018
6e9ee5b
util: _import_map
iblislin Dec 10, 2018
6d32d53
fix broadcasting for SymbolicNode
iblislin Dec 10, 2018
b8b7caf
fix MX_handle fallback constructors
iblislin Dec 10, 2018
5e71fe4
fix test/runtests.jl
iblislin Dec 12, 2018
d5deb38
ndarray: fix lastindex
iblislin Dec 12, 2018
3a31646
ndarray: fix matrix multiplication
iblislin Dec 12, 2018
ef8b91a
ndarray: fix Array initialization
iblislin Dec 12, 2018
5ec2771
ndarray: fix rdiv
iblislin Dec 12, 2018
553c8b0
ndarray: rmod_scalar
iblislin Dec 12, 2018
1526ab1
ndarray: power
iblislin Dec 12, 2018
f333748
ndarray: power
iblislin Dec 12, 2018
8020000
deprecate sum(::NDArray, dims)
iblislin Dec 15, 2018
dbdc0af
deprecate maximum(::NDArray, dims)
iblislin Dec 16, 2018
9f196b3
deprecate minimum(::NDArray, dims)
iblislin Dec 21, 2018
1a11300
ndarray: fix MX_handle fallback constructor
iblislin Dec 21, 2018
1adb79d
fix depwarns
iblislin Dec 21, 2018
766c295
fix Base.size
iblislin Dec 22, 2018
257b67d
ndarray: fix nd_as_jl macro
iblislin Dec 22, 2018
1dd7ae7
ndarray: fix test cases
iblislin Dec 22, 2018
57dd637
ndarray: deprecate mean(::NDArray, dims)
iblislin Dec 22, 2018
d761ffa
ndarray: fix test cases depwarns
iblislin Dec 23, 2018
d92b948
ndarray: deprecate Base.prod(::NDArray, dims)
iblislin Dec 23, 2018
d4c1981
ndarray: fix sum depwarns in test cases
iblislin Dec 23, 2018
b7f823d
ndarray: deprecate Base.cat(dims, As...)
iblislin Dec 23, 2018
f67d0ae
ndarray: fix size depwarn in test cases
iblislin Dec 23, 2018
1951fa7
symbol: fix info macro in test cases
iblislin Dec 23, 2018
a8bf5b2
SymbolicNode: replace Nullable with Missing for get_attr
iblislin Dec 26, 2018
22ac8bd
symbol: fix literal_pow broadcast
iblislin Dec 29, 2018
3055092
symbol: flipdim -> reverse
iblislin Dec 29, 2018
b2cd54c
symbol: fix findall
iblislin Dec 29, 2018
89a4b41
executor: fix Cvoid depwarns
iblislin Dec 29, 2018
e77a154
symbolic: fix test cases
iblislin Dec 29, 2018
aaed2d6
bind: fix test cases depwarns
iblislin Dec 29, 2018
2e895b1
test/operator: fix depwarns
iblislin Dec 29, 2018
5f5801d
test/random: fix depwarns
iblislin Dec 29, 2018
f3c6477
test/metric: fix depwarns
iblislin Dec 30, 2018
5f2f0be
metric: style stuffs
iblislin Dec 30, 2018
0d72389
optimizer: fix Void depwarn
iblislin Dec 30, 2018
1ab3ef1
optimizer: fix doc depwarns
iblislin Dec 30, 2018
30db122
io: fix iteration protocol
iblislin Dec 30, 2018
5fa5a59
test/io: fix depwarns
iblislin Dec 30, 2018
355e248
base: refine _get_lib_version!
iblislin Dec 31, 2018
11e47ca
utils: fix depwarns
iblislin Dec 31, 2018
a48212e
base: fix Vector init depwarns
iblislin Dec 31, 2018
ccf003d
test/optimizer: fix depwarns
iblislin Dec 31, 2018
a9b4e49
kvstore: fix depwarns
iblislin Dec 31, 2018
380cc19
update nn-factory
iblislin Dec 31, 2018
001cde0
symbol: fix flipdim depwarns
iblislin Dec 31, 2018
739fe2a
fix info macro in tests
iblislin Dec 31, 2018
4c70ed4
ndarray: fix broadcast on rminus
iblislin Dec 31, 2018
b5cb129
model: fix Cvoid depwarn
iblislin Dec 31, 2018
0d794a0
test/util: fix depwarns
iblislin Dec 31, 2018
bf1ed69
visualize: fix depwarns
iblislin Dec 31, 2018
2ba647b
runtests: fix depwarns
iblislin Dec 31, 2018
d3f0712
ndarray: fix import warning
iblislin Dec 31, 2018
e0b60df
deprecated.jl: fix warn macro
iblislin Dec 31, 2018
519cab3
fix info macro
iblislin Dec 31, 2018
cc9b9e2
fix occursin depwarn
iblislin Dec 31, 2018
d185c8b
model: fix array broadcast
iblislin Dec 31, 2018
c3db25c
use __DIR__ instead of dirname(macro __FILE__)
iblislin Dec 31, 2018
55a3476
fix readstring deprecation
iblislin Dec 31, 2018
d6c7a51
fix `cat` depwarns
iblislin Dec 31, 2018
1820e0c
indmax -> argmax
iblislin Dec 31, 2018
eb9eff8
model: fix depwarn
iblislin Jan 1, 2019
75fe050
examples/char-lstm: fix depwarns
iblislin Jan 1, 2019
5e3ad17
Jenkins: add julia 1.0.3 build
iblislin Jan 1, 2019
44effe7
Julia Pkg3 new installation process
iblislin Jan 1, 2019
65edba9
ci: fix versioninfo
iblislin Jan 1, 2019
74b0793
ci: fix julia package dir
iblislin Jan 1, 2019
123230d
base: remove isnull
iblislin Jan 1, 2019
83d88ca
ci: fix julia doc build
iblislin Jan 1, 2019
a2eb2c2
fix warn macro
iblislin Jan 1, 2019
b902759
fix depwarns in build.jl
iblislin Jan 10, 2019
7917414
fix workspace name
iblislin Jan 11, 2019
68349cf
Update ci/docker/runtime_functions.sh
iblislin Jan 11, 2019
b134eea
fix docs build
iblislin Jan 11, 2019
fb2cc4a
fix docs build
iblislin Jan 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions ci/docker/install/ubuntu_julia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@

set -ex

export JLBINARY='julia.tar.gz'
export JULIADIR='/work/julia'
export JULIA="${JULIADIR}/bin/julia"
function install_julia() {
local suffix=`echo $1 | sed 's/\.//'` # 0.7 -> 07; 1.0 -> 10
local JLBINARY="julia-$1.tar.gz"
local JULIADIR="/work/julia$suffix"
local JULIA="${JULIADIR}/bin/julia"

mkdir -p $JULIADIR
# The julia version in Ubuntu repo is too old
# We download the tarball from the official link:
# https://julialang.org/downloads/
wget -O $JLBINARY https://julialang-s3.julialang.org/bin/linux/x64/0.6/julia-0.6.2-linux-x86_64.tar.gz
tar xzvf $JLBINARY -C $JULIADIR --strip 1
rm $JLBINARY
mkdir -p $JULIADIR
# The julia version in Ubuntu repo is too old
# We download the tarball from the official link:
# https://julialang.org/downloads/
wget -O $JLBINARY https://julialang-s3.julialang.org/bin/linux/x64/$1/julia-$2-linux-x86_64.tar.gz
tar xzvf $JLBINARY -C $JULIADIR --strip 1
rm $JLBINARY

$JULIA -e 'versioninfo()'
$JULIA -e 'using InteractiveUtils; versioninfo()'
}

install_julia 0.7 0.7.0
install_julia 1.0 1.0.3
50 changes: 27 additions & 23 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -893,35 +893,45 @@ unittest_ubuntu_gpu_R() {
make rpkgtest R_LIBS=/tmp/r-site-library R_GPU_ENABLE=1
}

unittest_ubuntu_cpu_julia06() {
unittest_ubuntu_cpu_julia() {
set -ex
export PATH="/work/julia/bin:$PATH"
export PATH="$1/bin:$PATH"
export MXNET_HOME='/work/mxnet'
export JULIA_PKGDIR='/work/julia-pkg'
export DEPDIR=`julia -e 'print(Pkg.dir())'`
export JULIA_DEPOT_PATH='/work/julia-depot'
export DEVDIR="$JULIA_DEPOT_PATH/dev"

julia -e 'versioninfo()'
julia -e 'Pkg.init()'
julia -e 'using InteractiveUtils; versioninfo()'

# install package
ln -sf ${MXNET_HOME}/julia ${DEPDIR}/MXNet
mkdir -p $DEVDIR
ln -sf ${MXNET_HOME}/julia ${DEVDIR}/MXNet

# install dependencies
julia -e 'Pkg.resolve()'
# register MXNet.jl and dependencies
julia -e 'using Pkg; Pkg.develop("MXNet")'

# FIXME
export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libjemalloc.so'

# use the prebuilt binary from $MXNET_HOME/lib
julia -e 'Pkg.build("MXNet")'
julia -e 'using Pkg; Pkg.build("MXNet")'

# run the script `julia/test/runtests.jl`
julia -e 'Pkg.test("MXNet")'
julia -e 'using Pkg; Pkg.test("MXNet")'

# See https://github.com/dmlc/MXNet.jl/pull/303#issuecomment-341171774
julia -e 'using MXNet; mx._sig_checker()'
}

unittest_ubuntu_cpu_julia07() {
set -ex
unittest_ubuntu_cpu_julia /work/julia07
}

unittest_ubuntu_cpu_julia10() {
set -ex
unittest_ubuntu_cpu_julia /work/julia10
}

unittest_centos7_cpu() {
set -ex
cd /work/mxnet
Expand Down Expand Up @@ -1224,24 +1234,18 @@ deploy_docs() {

deploy_jl_docs() {
set -ex
export PATH="/work/julia/bin:$PATH"
export PATH="/work/julia10/bin:$PATH"
export MXNET_HOME='/work/mxnet'
export JULIA_PKGDIR='/work/julia-pkg'
export DEPDIR=`julia -e 'print(Pkg.dir())'`
export JULIA_DEPOT_PATH='/work/julia-depot'
export DEVDIR="$JULIA_DEPOT_PATH/dev"

julia -e 'versioninfo()'
julia -e 'Pkg.init()'
ln -sf ${MXNET_HOME}/julia ${DEPDIR}/MXNet
julia -e 'Pkg.resolve()'
julia -e 'using InteractiveUtils; versioninfo()'
mkdir -p $DEVDIR

# FIXME
export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libjemalloc.so'

# use the prebuilt binary from $MXNET_HOME/lib
julia -e 'Pkg.build("MXNet")'
# build docs
julia -e 'Pkg.add("Documenter")'
julia -e 'cd(Pkg.dir("MXNet")); include(joinpath("docs", "make.jl"))'
make -C docs
iblislin marked this conversation as resolved.
Show resolved Hide resolved

# TODO: make Jenkins worker push to MXNet.jl ph-pages branch if master build
# ...
Expand Down
21 changes: 17 additions & 4 deletions ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -918,13 +918,26 @@ def test_unix_r_gpu() {
}]
}

def test_unix_julia_cpu() {
return ['Julia 0.6: CPU': {
def test_unix_julia07_cpu() {
return ['Julia 0.7: CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/ut-julia06-cpu') {
ws('workspace/ut-julia07-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('cpu', mx_lib)
utils.docker_run('ubuntu_cpu', 'unittest_ubuntu_cpu_julia06', false)
utils.docker_run('ubuntu_cpu', 'unittest_ubuntu_cpu_julia07', false)
}
}
}
}]
}

def test_unix_julia10_cpu() {
return ['Julia 1.0: CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/ut-julia07-cpu') {
iblislin marked this conversation as resolved.
Show resolved Hide resolved
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('cpu', mx_lib)
utils.docker_run('ubuntu_cpu', 'unittest_ubuntu_cpu_julia10', false)
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions ci/jenkins/Jenkinsfile_unix_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ core_logic: {
custom_steps.compile_unix_mkl_cpu(),
custom_steps.compile_unix_mkldnn_cpu(),
custom_steps.compile_unix_mkldnn_mkl_cpu()
])
])

utils.parallel_stage('Tests', [
custom_steps.test_unix_python2_cpu(),
Expand All @@ -52,7 +52,8 @@ core_logic: {
custom_steps.test_unix_scala_cpu(),
custom_steps.test_unix_clojure_cpu(),
custom_steps.test_unix_r_cpu(),
custom_steps.test_unix_julia_cpu(),
custom_steps.test_unix_julia07_cpu(),
custom_steps.test_unix_julia10_cpu(),
custom_steps.test_unix_onnx_cpu(),

/* Disabled due to master build failure:
Expand Down
3 changes: 0 additions & 3 deletions julia/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ data
deps/src
deps/usr
deps/deps.jl
docs/_build
docs/build/
docs/site/
.vscode
2 changes: 1 addition & 1 deletion julia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ labels = reduce(
labels .= labels .+ 1

# Now we use compute the accuracy
pred = map(i -> indmax(probs[1:10, i]), 1:size(probs, 2))
pred = map(i -> argmax(probs[1:10, i]), 1:size(probs, 2))
correct = sum(pred .== labels)
accuracy = 100correct/length(labels)
@printf "Accuracy on eval set: %.2f%%\n" accuracy
Expand Down
1 change: 0 additions & 1 deletion julia/REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Formatting
BinDeps
JSON
MacroTools
TakingBroadcastSeriously
Reexport
74 changes: 37 additions & 37 deletions julia/deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# specific language governing permissions and limitations
# under the License.

import JSON
using JSON
using Libdl
using LinearAlgebra

################################################################################
# First try to detect and load existing libmxnet
Expand All @@ -26,65 +28,67 @@ curr_win = "20180211" # v1.1.0

if haskey(ENV, "MXNET_HOME")
MXNET_HOME = ENV["MXNET_HOME"]
info("MXNET_HOME environment detected: $MXNET_HOME")
info("Trying to load existing libmxnet...")
@info("MXNET_HOME environment detected: $MXNET_HOME")
@info("Trying to load existing libmxnet...")
# In case of macOS, if user build libmxnet from source and set the MXNET_HOME,
# the output is still named as `libmxnet.so`.
lib = Libdl.find_library(["libmxnet.$(Libdl.dlext)", "libmxnet.so"],
[joinpath(MXNET_HOME, "lib"), MXNET_HOME])
if !isempty(lib)
info("Existing libmxnet detected at $lib, skip building...")
@info("Existing libmxnet detected at $lib, skip building...")
libmxnet_detected = true
else
info("Failed to load existing libmxnet, trying to build from source...")
@info("Failed to load existing libmxnet, trying to build from source...")
end
end

# Try to find cuda
CUDAPATHS = String[]
if haskey(ENV, "CUDA_HOME")
push!(CUDAPATHS, joinpath(ENV["CUDA_HOME"], "lib64"))
elseif is_linux()
elseif Sys.islinux()
append!(CUDAPATHS, ["/opt/cuda/lib64", "/usr/local/cuda/lib64"])
end

if is_unix()
if Sys.isunix()
try
push!(CUDAPATHS, replace(strip(readstring(`which nvcc`)), "bin/nvcc", "lib64"))
push!(CUDAPATHS, replace(strip(read(`which nvcc`, String)), "bin/nvcc", "lib64"))
catch
end
end

HAS_CUDA = false
HAS_CUDNN = false
let cudalib = Libdl.find_library(["libcuda", "nvcuda.dll"], CUDAPATHS)
HAS_CUDA = !isempty(cudalib) && Libdl.dlopen_e(cudalib) != C_NULL
global HAS_CUDA = !isempty(cudalib) && Libdl.dlopen_e(cudalib) != C_NULL
end

if !HAS_CUDA && is_windows()
if !HAS_CUDA && Sys.iswindows()
# TODO: this needs to be improved.
try
run(`nvcc --version`)
HAS_CUDA = true
global HAS_CUDA = true
catch
end
end

if HAS_CUDA # then check cudnn
let cudnnlib = Libdl.find_library("libcudnn", CUDAPATHS)
HAS_CUDNN = !isempty(cudnnlib) && Libdl.dlopen_e(cudnnlib) != C_NULL
global HAS_CUDNN = !isempty(cudnnlib) && Libdl.dlopen_e(cudnnlib) != C_NULL
if HAS_CUDNN && !haskey(ENV, "CUDA_HOME") # inference `CUDA_HOME`
ENV["CUDA_HOME"] = dirname(dirname(cudnnlib))
end
end
end

if HAS_CUDA
info("Found a CUDA installation.")
@info("Found a CUDA installation.")
if HAS_CUDNN
info("Found a CuDNN installation.")
@info("Found a CuDNN installation.")
end
info("CUDA_HOME -> $(get(ENV, "CUDA_HOME", nothing))")
@info("CUDA_HOME -> $(get(ENV, "CUDA_HOME", nothing))")
else
info("Did not find a CUDA installation, using CPU-only version of MXNet.")
@info("Did not find a CUDA installation, using CPU-only version of MXNet.")
end

# propagate more build flags from ENV
Expand All @@ -98,26 +102,26 @@ function get_cpucore()
if haskey(ENV, "TRAVIS") # on travis-ci
2
else
min(Sys.CPU_CORES, 32)
min(Sys.CPU_THREADS, 32)
end
end

using BinDeps
@BinDeps.setup
if !libmxnet_detected
if is_windows()
if Sys.iswindows()
if Sys.ARCH != :x86_64
info("Prebuilt windows binaries are only available on 64bit. You will have to built MXNet yourself.")
@info("Prebuilt windows binaries are only available on 64bit. You will have to built MXNet yourself.")
return
end
info("Downloading pre-built packages for Windows.")
@info("Downloading pre-built packages for Windows.")
base_url = "https://github.com/yajiedesign/mxnet/releases/download/weekly_binary_build_v2/prebuildbase_win10_x64_vc14_v2.7z"

if libmxnet_curr_ver == "master"
# download_cmd uses powershell 2, but we need powershell 3 to do this
run(`powershell -NoProfile -Command Invoke-WebRequest -Uri "https://api.github.com/repos/yajiedesign/mxnet/releases/latest" -OutFile "mxnet.json"`)
curr_win = JSON.parsefile("mxnet.json")["tag_name"]
info("Can't use MXNet master on Windows, using latest binaries from $curr_win.")
@info("Can't use MXNet master on Windows, using latest binaries from $curr_win.")
end
# TODO: Get url from JSON.
name = "mxnet_x64_vc14_$(HAS_CUDA ? "gpu" : "cpu").7z"
Expand All @@ -144,8 +148,7 @@ if !libmxnet_detected
################################################################################

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

blas_vendor = Base.BLAS.vendor()
blas_vendor = LinearAlgebra.BLAS.vendor()

ilp64 = ""
if blas_vendor == :openblas64
Expand All @@ -154,18 +157,18 @@ if !libmxnet_detected

FORCE_LAPACK = false
if blas_vendor == :unknown
info("Julia is built with an unkown blas library ($blas_path).")
info("Attempting build without reusing the blas library")
@info("Julia is built with an unkown blas library ($blas_path).")
@info("Attempting build without reusing the blas library")
USE_JULIA_BLAS = false
elseif !(blas_vendor in (:openblas, :openblas64))
info("Unsure if we can build against $blas_vendor.")
info("Attempting build anyway.")
@info("Unsure if we can build against $blas_vendor.")
@info("Attempting build anyway.")
USE_JULIA_BLAS = true
else
USE_JULIA_BLAS = true
FORCE_LAPACK = true
end
info("USE_JULIA_BLAS -> $USE_JULIA_BLAS")
@info("USE_JULIA_BLAS -> $USE_JULIA_BLAS")

blas_name = blas_vendor == :openblas64 ? "openblas" : string(blas_vendor)
MSHADOW_LDFLAGS = "MSHADOW_LDFLAGS=-lm $blas_path"
Expand All @@ -188,7 +191,7 @@ if !libmxnet_detected
@build_steps begin
BinDeps.DirectoryRule(_mxdir, @build_steps begin
ChangeDirectory(_srcdir)
`git clone https://github.com/apache/incubator-mxnet`
`git clone https://github.com/apache/incubator-mxnet mxnet`
end)
@build_steps begin
ChangeDirectory(_mxdir)
Expand All @@ -199,15 +202,12 @@ if !libmxnet_detected
`git checkout origin/$libmxnet_curr_ver`
end
`git submodule update --init --recursive`
`git -C mshadow checkout -- make/mshadow.mk`

# copying on changed, make travis caching happy
`../../cpcblas.sh`

`sed -i -s "s/MSHADOW_CFLAGS = \(.*\)/MSHADOW_CFLAGS = \1 $ilp64/" mshadow/make/mshadow.mk`
`git -C 3rdparty/mshadow checkout -- make/mshadow.mk`
`cp -v ../../cblas.h include/cblas.h`
`sed -i -s "s/MSHADOW_CFLAGS = \(.*\)/MSHADOW_CFLAGS = \1 $ilp64/" 3rdparty/mshadow/make/mshadow.mk`

# Copy config.mk, always override the file
if is_apple()
if Sys.isapple()
`cp make/osx.mk config.mk`
else
`cp make/config.mk config.mk`
Expand Down Expand Up @@ -239,7 +239,7 @@ if !libmxnet_detected
# Force enable LAPACK build
# Julia's OpenBLAS has LAPACK functionality already
if FORCE_LAPACK
if is_apple()
if Sys.isapple()
MSHADOW_LDFLAGS *= " -framework Accelerate"
end
`sed -i -s 's/ADD_CFLAGS =\(.*\)/ADD_CFLAGS =\1 -DMXNET_USE_LAPACK/' config.mk`
Expand Down
Loading