Package Details: mxnet-mkl 1.7.0-2

Git Clone URL: https://aur.archlinux.org/mxnet.git (read-only, click to copy)
Package Base: mxnet
Description: Flexible and Efficient Library for Deep Learning (with MKL)
Upstream URL: https://mxnet.apache.org/
Keywords: deep_learning deep_neural_networks distributed_systems machine_learning
Licenses: Apache
Conflicts: mxnet
Provides: mxnet
Submitter: Godisemo
Maintainer: None
Last Packager: petronny
Votes: 12
Popularity: 0.000023
First Submitted: 2017-02-11 00:12 (UTC)
Last Updated: 2020-12-12 11:17 (UTC)

Required by (7)

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/np_delete_op.cc:27:
/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/np_delete_op.cc:27:
/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().
    Aborting...

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/im2rec.cc.o -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/librt.so  3rdparty/openmp/runtime/src/libomp.so  -lpthread  -llapack
  /usr/lib/libcudnn.so  -lcuda  /lib/libnccl.so  /usr/lib/libopencv_highgui.so.4.5.2  3rdparty/dmlc-core/libdmlc.a  /usr/lib/libopencv_videoio.so.4.5.2  /usr/lib/libopencv_imgcodecs.so.4.5.2  /usr/lib/libopencv_imgproc.so.4.5.2  /usr/lib/libopencv_core.so.4.5.2  -lpthread  /opt/cuda/lib64/libcudart.so  /opt/cuda/lib64/stubs/libcufft.so  /opt/cuda/lib64/stubs/libcublas.so  /opt/cuda/lib64/stubs/libcusolver.so  /opt/cuda/lib64/stubs/libcusparse.so  /opt/cuda/lib64/stubs/libcurand.so  /opt/cuda/lib64/stubs/libnvrtc.so  /opt/cuda/lib64/stubs/libcuda.so  /opt/cuda/lib64/libnvToolsExt.so  -ldl  -lrt  -lcudadevrt  -lcudart_static  -lrt  -lpthread  -ldl && :
/usr/sbin/ld: /usr/lib/libopencv_core.so.4.5.2: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13'
/usr/sbin/ld: /usr/lib/libopencv_imgcodecs.so.4.5.2: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/usr/sbin/ld: /usr/lib/libopencv_core.so.4.5.2: 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'...
done.
fatal: invalid reference: 1.7.0.rc1
==> ERROR: Failure while creating working copy of mxnet git repo
    Aborting...
error making: mxnet (mxnet-mkl-cuda)

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

pkgver=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(la_op.cc.o): undefined reference to symbol 'cblas_ssyrk'
/bin/ld: /usr/lib/libcblas.so.3: 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

cmake -DUSE_NCCL=1 -DUSE_CPP_PACKAGE=1 -DCMAKE_BUILD_TYPE=Release -GNinja ..

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 dev_menu.py 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 (https://pastebin.com/5K3FZkCB) 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) https://pastebin.com/VgUNTm6A

  • apply MKLDNN patch (remove -Werror causing abort) https://pastebin.com/6SpE3btx

  • call ./dev_menu.py build

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

ty, Oliver