mnn

MNN is a highly efficient and lightweight deep learning framework.

Latest version: 3.4.1

Add to xmake.lua

add_requires("mnn 3.4.1")

Learn how to add and link packages with Xmake →

Information

License
Apache-2.0
Recipe updated
2026-04-02T04:16:03.000Z

Platforms

  • linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
  • android: armeabi, armeabi-v7a, arm64-v8a, riscv64, x86, x86_64, mips, mip64
  • windows: x86, x64
  • iphoneos: arm64
  • macosx: x86_64, arm64

Options

arm82
Enable arm82 support. · Type: boolean · Default: false
avx512
Enable avx512 support. · Type: boolean · Default: false
convert
Build convert tool. · Type: boolean · Default: false
coreml
Enable coreml support. · Type: boolean · Default: false
cuda
Enable cuda support. · Type: boolean · Default: false
metal
Enable metal support. · Type: boolean · Default: false
onednn
Enable onednn support. · Type: boolean · Default: false
opencl
Enable opencl support. · Type: boolean · Default: false
opengl
Enable opengl support. · Type: boolean · Default: false
openmp
Use OpenMP's thread pool implementation. Does not work on iOS or Mac OS. · Type: boolean · Default: false
quantools
Build quantools tool. · Type: boolean · Default: false
tensorrt
Enable tensorrt support. · Type: boolean · Default: false
thread_pool
Use MNN's own thread pool implementation. Will disabel openmp. · Type: boolean · Default: true
train
Build train tool. · Type: boolean · Default: false
use_system_lib
When compiling OpenCL/Vulkan, it depends on the OpenCL / Vulkan library of the system. · Type: boolean · Default: false
vulkan
Enable vulkan support. · Type: boolean · Default: false

Versions

  • 1.2.1
  • 1.2.2
  • 3.0.5
  • 3.1.1
  • 3.2.4
  • 3.3.0
  • 3.4.1

Dependencies

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "mnn 3.4.1"

show info

xrepo info "mnn"

Link a library to your target

Declare the requirement, then attach the library to the target that uses it.

xmake.lua

add_requires("mnn 3.4.1")

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("mnn")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "mnn 3.4.1" shell