Package Details: mxnet 1.7.0-2

Git Clone URL: (read-only, click to copy)
Package Base: mxnet
Description: Flexible and Efficient Library for Deep Learning
Upstream URL:
Keywords: deep_learning deep_neural_networks distributed_systems machine_learning
Licenses: Apache
Submitter: Godisemo
Maintainer: None
Last Packager: petronny
Votes: 12
Popularity: 0.000004
First Submitted: 2017-02-11 00:12 (UTC)
Last Updated: 2020-12-12 11:17 (UTC)

Sources (15)

Pinned Comments

petronny commented on 2019-06-21 08:00 (UTC) (edited on 2019-06-25 07:24 (UTC) by petronny)

And about this package, I've splitted it into mxnet{,-cuda,-mkl}. And it will take lots of time and space to compile.

The pre-built binaries of mxnet{,-cuda,-mkl} and their dependencies can be found in arch4edu.

Latest Comments

1 2 3 4 5 6 Next › Last »

carlosal1015 commented on 2021-12-21 01:27 (UTC)

Hi, I have the following message error:

/tmp/makepkg/mxnet/src/mxnet/include/mshadow/././bfloat.h:75:26: note: ‘class mshadow::bfloat::bf16_t’ declared here
   75 | class MSHADOW_ALIGNED(2) bf16_t {
      |                          ^~~~~~
In file included from /tmp/makepkg/mxnet/src/mxnet/include/mshadow/tensor.h:1075,
                 from /tmp/makepkg/mxnet/src/mxnet/include/mxnet/./base.h:33,
                 from /tmp/makepkg/mxnet/src/mxnet/include/mxnet/engine.h:34,
                 from /tmp/makepkg/mxnet/src/mxnet/src/operator/numpy/./../../common/utils.h:32,
                 from /tmp/makepkg/mxnet/src/mxnet/src/operator/numpy/./np_delete_op-inl.h:31,
                 from /tmp/makepkg/mxnet/src/mxnet/src/operator/numpy/
/tmp/makepkg/mxnet/src/mxnet/include/mshadow/./tensor_cpu-inl.h:157:13: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class mshadow::bfloat::bf16_t’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
  157 |       memcpy(dst[y].dptr_, src[y].dptr_, sizeof(DType) * dst.size(1));
      |       ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/makepkg/mxnet/src/mxnet/include/mshadow/./base.h:299,
                 from /tmp/makepkg/mxnet/src/mxnet/include/mshadow/tensor.h:35,
                 from /tmp/makepkg/mxnet/src/mxnet/include/mxnet/./base.h:33,
                 from /tmp/makepkg/mxnet/src/mxnet/include/mxnet/engine.h:34,
                 from /tmp/makepkg/mxnet/src/mxnet/src/operator/numpy/./../../common/utils.h:32,
                 from /tmp/makepkg/mxnet/src/mxnet/src/operator/numpy/./np_delete_op-inl.h:31,
                 from /tmp/makepkg/mxnet/src/mxnet/src/operator/numpy/
/tmp/makepkg/mxnet/src/mxnet/include/mshadow/././bfloat.h:75:26: note: ‘class mshadow::bfloat::bf16_t’ declared here
   75 | class MSHADOW_ALIGNED(2) bf16_t {
      |                          ^~~~~~
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().

gnaggnoyil commented on 2021-05-26 17:31 (UTC) (edited on 2021-05-26 17:31 (UTC) by gnaggnoyil)

The same gcc toolchain version incompability issue @olko had mentioned happens again now. This time it's cuda 11.3 using gcc10 to build while all other system dependencies such as opencv are built with gcc11, which in turn makes error like the following:

[627/630] Linking CXX executable im2rec
FAILED: im2rec
: && /opt/cuda/bin/g++ -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wno-unknown-pragmas -Wno-sign-compare -O3 -std=c++11 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now CMakeFiles/im2rec.dir/tools/ -o im2rec -L/opt/cuda/lib64   -L/opt/cuda/targets/x86_64-linux/lib/stubs   -L/opt/cuda/targets/x86_64-linux/lib -Wl,-rpath,/opt/cuda/lib64/stubs:/opt/cuda/lib64:/home/gnaggnoyil-wsl/.cache/yay/mxnet/src/mxnet-cuda/build/3rdparty/openmp/runtime/src  -Wl,--whole-archive  libmxnet.a  -Wl,--no-whole-archive  -lcblas  -fopenmp  /usr/lib/  3rdparty/openmp/runtime/src/  -lpthread  -llapack
  /usr/lib/  -lcuda  /lib/  /usr/lib/  3rdparty/dmlc-core/libdmlc.a  /usr/lib/  /usr/lib/  /usr/lib/  /usr/lib/  -lpthread  /opt/cuda/lib64/  /opt/cuda/lib64/stubs/  /opt/cuda/lib64/stubs/  /opt/cuda/lib64/stubs/  /opt/cuda/lib64/stubs/  /opt/cuda/lib64/stubs/  /opt/cuda/lib64/stubs/  /opt/cuda/lib64/stubs/  /opt/cuda/lib64/  -ldl  -lrt  -lcudadevrt  -lcudart_static  -lrt  -lpthread  -ldl && :
/usr/sbin/ld: /usr/lib/ undefined reference to `std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13'
/usr/sbin/ld: /usr/lib/ undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/usr/sbin/ld: /usr/lib/ undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()@CXXABI_1.3.13'

stefan-zobel commented on 2020-10-12 12:27 (UTC) (edited on 2020-10-12 16:24 (UTC) by stefan-zobel)

Doesn't build for me (with error "invalid reference: 1.7.0.rc1")

==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of mxnet git repo...
Cloning into 'mxnet'...
fatal: invalid reference: 1.7.0.rc1
==> ERROR: Failure while creating working copy of mxnet git repo
error making: mxnet (mxnet-mkl-cuda)

But it worked after I've changed the pkgver in PKGBUILD to 1.7.0:


hwkiller commented on 2020-02-26 18:42 (UTC)

I'm not currently using the AUR package, but is the linking error you see the same as:

[ 94%] Linking CXX executable im2rec
/bin/ld: libmxnet.a( undefined reference to symbol 'cblas_ssyrk'
/bin/ld: /usr/lib/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/im2rec.dir/build.make:103: im2rec] Error 1

? I'm trying to build with CUDA and openblas, using their from-source instructions [Because I want to use it for R, not for python, and it's just easier this way]. I'd like to know whether I'm hitting the same snag as you all.

olko commented on 2020-02-05 05:41 (UTC) (edited on 2020-02-05 05:43 (UTC) by olko)

Update: MXNet can not be build with support for CUDA because Arch Linux uses GCC-9 while CUDA-10.2 supports only GCC-8. The CUDA-10.2 pacakge in Arch Linux is statically linked to GCC-8.

Mixing GCC-8 and GCC-9 compilation units may result in UB.

We have to wait for NVIDIA to release a CUDA version with GCC-9 support (of course Arch Linux's default compiler should remain GCC-9 too).

olko commented on 2020-02-04 05:11 (UTC) (edited on 2020-02-04 05:13 (UTC) by olko)

I could compile apache-mxnet-1.5.1 from sources without patching on a upt-to-data arch installation (gcc-9.2, cuda-10.2).

mkdir build && cd bild


ninja -v

enables CUDA, NCCL, OpenCV, OpenMP, MKL (intel), CPP-API.

Seams that patching isn't necessary.

Unfortunately linking fails at a clean checkout of mxnet from github (because of C++-ABI incompatibility) ...

petronny commented on 2020-02-04 04:58 (UTC)

@olko Let's do the steps one by one.
I'm trying to enable opencv and migrate the build script to now.

olko commented on 2020-01-15 20:20 (UTC)

any update? currently the AUR package of MXNet is not usable :(

petronny commented on 2019-12-25 08:52 (UTC)

@olko I'll take a look next month.

olko commented on 2019-12-25 08:39 (UTC) (edited on 2019-12-25 13:40 (UTC) by olko)

@petronny Your mxnet package fails because of unmet dependencies to intel and mkl packages (so I used the upstream archive).

I got MXNet compiled with OpenCV + CUDA + MKL.

The problem was that Arch Linux provides the newest GCC version (9.2.0 at this time) and newer versions are more eager to generate warnings.

MXNet uses -Werror that causes compilation abortion. As a quick fix I removed -Werror from the cmake config for MKLDNN. But I'll provide a pull request upstream that eliminates the warnings.

My Steps:

  • download and extract the official MXNet 1.5.1 archive (apache-mxnet-src-1.5.1-incubating.tar.gz)

  • cd apache-mxnet-src-1.5.1-incubating

  • store cmake config ( as cmake_options.yml in apache-mxnet-src-1.5.1-incubating (I believe that USE_MKLML_MKL and USE_MKLDNN are automatically switched on if USE_MKL_IF_AVAILABLE is enabled)

  • apply OpenCV patch (OpenCV-flags in namespace cv)

  • apply MKLDNN patch (remove -Werror causing abort)

  • call ./ build

Please, provide a new AUR package that uses my configuration from above (e.g. CUDA + MKL enabled for MXNet).

ty, Oliver