Library / SDK
uxlfoundation/oneDNN avatar
uxlfoundation/oneDNN

oneDNN: A Cross-Architecture Performance Library for Deep Learning Kernels

oneAPI Deep Neural Network Library (oneDNN). [ ][UXL Foundation] oneAPI Deep Neural Network Library (oneDNN) oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform performance library of basic building blocks for deep learning applications.

4,045 stars1,198 forksC++Apache-2.0

At a glance

What is it?
oneDNN provides optimized building blocks for deep learning frameworks, targeting Intel and Arm CPUs plus Intel GPUs, with experimental support for other architectures. This review covers its scope, mechanism, build process, and practical limitations.
Who is it for?
Adopt oneDNN if you are a framework developer or performance engineer targeting Intel or Arm CPUs, or Intel GPUs, and need optimized convolution, pooling, or matmul primitives. Skip it if you need production-grade support for NVIDIA or AMD GPUs, as those are experimental.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What oneDNN Solves and Who Needs It

oneDNN is a performance library of basic building blocks for deep learning applications. It addresses a specific problem: raw deep learning kernels written in C++ or Python are often far slower than the hardware can deliver. The library provides optimized implementations of operations like convolutions, pooling, and matrix multiplication, which are the core of most neural networks. The intended audience is not the typical data scientist; it is deep learning application and framework developers. The README lists PyTorch, TensorFlow, ONNX Runtime, and llama.cpp as applications enabled with oneDNN. If you use those tools, you already benefit from oneDNN indirectly. If you are building a new framework or a custom inference engine, you would link against oneDNN directly to get performance without hand-writing assembly for every CPU generation.

Architecture Support and the Experimental Boundary

The library is optimized for Intel 64 and AMD64 processors, Arm AArch64, and Intel Graphics. That is the core promise. The README is explicit about experimental support for NVIDIA GPU, AMD GPU, OpenPOWER PPC64, IBMz s390x, and RISC-V. This is a critical distinction. A team targeting NVIDIA GPUs would find oneDNN's CUDA support marked experimental, which means limited testing and no guarantee of parity with the CPU path. The warning in the README for PPC64, s390x, and RISC-V states they are experimental with limited testing validation. If your production environment runs on those architectures, you should treat oneDNN as a risk, not a default choice. The CPU support list is long, from Haswell to future Intel Core and Xeon processors with AVX10.2, but it also contains deprecated entries. Intel Atom, older Core, and Xeon E3/E5/E7 v1 and v2 are deprecated, and SSE4.1 and AVX optimizations will be removed in future releases. That means legacy hardware support is shrinking, not growing.

The Mechanism: JIT Code Generation and Runtime ISA Detection

On Intel 64 and AMD64 CPUs, oneDNN detects the instruction set architecture at runtime and uses just-in-time (JIT) code generation. This is the core mechanism that lets one binary run on a Haswell server and a Sapphire Rapids machine, generating specialized code for each. The README says the library uses JIT to deploy code optimized for the latest supported ISA. The trade-off is complexity: JIT code generation is hard to debug and can introduce security concerns if the generated code is not properly sandboxed. The library also has a CPU dispatcher control documented in the developer guide, which lets you override the default ISA detection. This is useful when you want to force a specific ISA level for testing or to avoid a buggy instruction on a particular CPU. The runtime detection is a strong feature for portability, but it also means you cannot assume the exact code path that will execute on a given machine.

Getting It Running: Build Requirements and Commands

The README gives clear build requirements. You need a C++ compiler with C++11 support, CMake 3.13 or later, and an operating system that supports one of the listed architectures. The build process is standard for a CMake-based project. From the repository, you would run cmake to configure, then make or use the generated build system. The README does not show the exact commands in the provided excerpt, but the CMake requirement is explicit. For documentation, you need Doxygen 1.8.5 or later, Doxyrest 2.1.2 or later, Sphinx 7.4.7 or later, sphinx-book-theme, sphinx-copybutton, and graphviz. That is a heavy documentation stack, but it is only needed if you build the docs. The library itself has a relatively low build barrier: C++11 and CMake are old and widely available. One caveat: CPU and GPU engine configurations may introduce additional build-time dependencies, so a minimal build might be simpler than a full build with all engines enabled.

Performance Scope and Where It Is the Wrong Tool

oneDNN is not a deep learning framework. It does not give you automatic differentiation, model training loops, or a high-level API. The README is explicit that deep learning practitioners should use applications enabled with oneDNN, not the library directly. If you are a researcher who wants to prototype a new architecture, oneDNN is the wrong tool; you would use PyTorch or TensorFlow, which themselves use oneDNN. The library is also the wrong tool if you need bleeding-edge support for NVIDIA GPUs, because that path is experimental. The wrong tool case also includes legacy hardware: if your fleet is all Intel Atom or older Xeon v1/v2, the deprecation means you are on borrowed time. The library's strength is in production inference and training on Intel CPUs and GPUs, where the optimizations are mature. The README's warning about macOS hardened runtime entitlements is another constraint: if you ship a macOS app with oneDNN, you may need special entitlements, which adds friction to distribution.

Alternatives and the Difference in Approach

The most direct alternative is oneDNN's sibling, oneAPI Math Kernel Library (oneMKL), but that is not the right comparison because oneMKL covers general math, not just deep learning. A more relevant alternative is NVIDIA's cuDNN, which provides optimized deep learning primitives for NVIDIA GPUs. The difference in approach is fundamental: cuDNN is closed-source, proprietary, and tied to CUDA, while oneDNN is open-source under Apache-2.0 and aims for cross-architecture support. If your workload is NVIDIA-only, cuDNN is the mature choice. If you need portability across Intel, Arm, and possibly AMD GPUs, oneDNN's experimental support may eventually cover that, but cuDNN will not. Another alternative is to write your own kernels with a JIT library like LLVM, but that is a massive engineering effort. The real difference is that oneDNN gives you a tested, maintained set of primitives with a defined API, whereas the alternative of hand-rolling is only viable for a very small set of operations.

Maintenance, License, and Upgrade Cost

The license is Apache-2.0, which is permissive and allows commercial use, modification, and redistribution. That is a low-license-friction choice for a library. The release cadence is active: v3.13.2 was pushed on 2026-08-26, with v3.12.5 and v3.13.1 in the same month. That suggests ongoing maintenance and a steady stream of fixes and optimizations. However, the deprecation of SSE4.1 and AVX optimizations is a maintenance signal: the project is willing to drop old hardware support to focus on newer ISAs. Upgrade cost is moderate. Because the API is stable across versions, as indicated by the version numbering, you can likely upgrade without rewriting code. But you must check the release notes for each version, because performance optimizations may change the numerical results slightly, and deprecations may break builds on old CPUs. The documentation stack requires specific tool versions, so if you build docs, you need to keep those in sync. The project is part of the UXL Foundation, which gives it a governance structure beyond a single vendor, but the README does not detail the governance model, so you should verify the contribution and support policies if you plan to depend on it long-term.

Editorial conclusion

Adopt oneDNN if you are a framework developer or performance engineer targeting Intel or Arm CPUs, or Intel GPUs, and need optimized convolution, pooling, or matmul primitives. Skip it if you need production-grade support for NVIDIA or AMD GPUs, as those are experimental. Before adopting, verify that your target hardware is in the supported list, check the CPU dispatcher control documentation for the latest ISA support, and review the release notes for v3.13.2 to see if any deprecations affect your use case. The library's Apache-2.0 license and active release cadence make it a viable foundation, but the experimental status of non-Intel architectures is a real boundary.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes