Julia Flux Environment

Build ArrayFire

apt-get -qq update
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends \
  libfreeimage-dev cmake-curses-gui \
  libboost-dev libopenblas-dev libfftw3-dev liblapacke-dev \
  libglfw3-dev libfontconfig1-dev libglm-dev xorg-dev
34.6s
Julia ArrayFire (Bash in Julia)
git clone --recursive https://github.com/arrayfire/arrayfire
cd arrayfire
git checkout a4485443684cc9ddbcbcaeb35b9024317904c518
31.4s
Julia ArrayFire (Bash in Julia)
conda install -c intel mkl-devel
conda clean -qtipy
ldconfig
56.8s
Julia ArrayFire (Bash in Julia)
cd arrayfire
rm -rf build
mkdir -p build && cd build
cmake .. \
  -DMKL_INCLUDE_DIR="/opt/conda/include" \
  -DMKL_Core_LINK_LIBRARY="/opt/conda/lib" \
  -DCMAKE_BUILD_TYPE=Release
make -j5 # or number of threads of your choosing
make install
8921.8s
Julia ArrayFire (Bash in Julia)
ENV["LD_LIBRARY_PATH"] = "/usr/local/lib/"
0.5s
Julia ArrayFire (Julia)
"/usr/local/lib/"
]add ArrayFire; build ArrayFire; test ArrayFire
185.6s
Julia ArrayFire (Julia)

Install Flux

]registry update; add AbstractPlotting JSCall
15.5s
Julia Flux GPU (Julia)
Julia ArrayFire
]remove Netpbm ImageCore FixedPointNumbers ImageShow NRRD
0.5s
Julia Flux GPU (Julia)
Julia ArrayFire
]up
8.4s
Julia Flux GPU (Julia)
Julia ArrayFire
]add Flux#v0.10.0 FFTW#master ArrayFire#master CuArrays BSON ImageFiltering Unitful
44.6s
Julia Flux GPU (Julia)
Julia ArrayFire
]add PackageCompiler#sd-notomls Adapt BenchmarkTools Colors FileIO ImageShow Plots GR CuArrays ProgressMeter GPUArrays CUDAnative CUDAdrv NNlib
15.5s
Julia Flux GPU (Julia)
Julia ArrayFire
using Flux
# download data, to make sure they persist in the file system
for Mod in (Flux.Data.FashionMNIST, Flux.Data.MNIST)
  Mod.images(:train)
  Mod.labels(:train)
end;
186.7s
Julia Flux GPU (Julia)
Julia ArrayFire
]precompile
286.8s
Julia Flux GPU (Julia)
Julia ArrayFire
open("run.jl", "w") do io
  pkgs = keys(Pkg.installed())
  println(io, """
    import Unitful, GR#, CUDAnative, CUDAdrv, CuArrays; 
    Unitful.__init__(); GR.__init__()
    #CUDAdrv.__init__(); CUDAnative.__init__(); CuArrays.__init__()
    using ImageFiltering, Plots, DataFrames, GPUArrays, CSV, BenchmarkTools, StatsPlots, ImageShow, StatsBase, Flux, NNlib, Colors
  """)
end
0.4s
Julia Flux GPU (Julia)
Julia ArrayFire
using PackageCompiler
syso, sysold = PackageCompiler.compile_incremental("/run.jl")
cp(syso, sysold, force = true)
450.6s
Julia Flux GPU (Julia)
Julia ArrayFire
"/usr/local/julia/lib/julia/sys.so"

Test

using Flux, CuArrays, BSON, ImageFiltering, Unitful, Adapt, BenchmarkTools, Colors, FileIO, ImageShow, Plots, GR, CuArrays, ProgressMeter, GPUArrays, CUDAnative, CUDAdrv, NNlib
49.9s
Julia
Julia Flux GPU
Runtimes (3)