Skip to content

Instantly share code, notes, and snippets.

@zhreshold
Created September 14, 2018 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhreshold/4ce2d64980990950085a19b9ccc7644a to your computer and use it in GitHub Desktop.
Save zhreshold/4ce2d64980990950085a19b9ccc7644a to your computer and use it in GitHub Desktop.
GluonCV C++ inference prebuilt demos
Platform Download link
Linux(cpu, openblas)1
Linux(gpu, cuda9.0)13
Linux(gpu, cuda9.2)13
Windows x64(cpu, openblas)
Windows x64(gpu, cuda9.2)3
Mac OS(cpu, appleblas)2 x

1: use LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. gluoncv-detect in case you are using the supplied shared libraries under the same directory. You can add export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/path/to/prebuilt-package to ~/.bashrc to permanently add library into search path.

2: use DYLD_FALLBACK_LIBRARY_PATH=. gluoncv-detect in case you are using the supplied shared libraries under the same directory. You can add export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:~/path/to/prebuilt-package to ~/.bash_profile to permanently add library into search path.

3: You may want to disable CUDNN autotune feature which is useful in large batch training, but not desirable during single image inference by export MXNET_CUDNN_AUTOTUNE_DEFAULT=0 in Linux/MacOS or set MXNET_CUDNN_AUTOTUNE_DEFAULT=0 in Windows.

Tip: how to acquire up to date pre-built libmxnet shared library

  1. You can download prebuilt libmxnet binaries from PyPI wheels. For example, you can download mxnet 1.3.0 wheels from PyPI, extract libmxnet.{so|dll} by opening the wheel as zip file(you may change the suffix of *.whl to *.zip). For Linux and Mac, the targeting shared library is libmxnet.so, for windows, the library is libmxnet.dll.

  2. You can then replace the libmxnet.* in previously downloaded binary package with the extracted libmxnet from PyPI wheel.

By doing this, You may switch between mxnet cpu/gpu or blas versions without build from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment