HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Maratyszcza
NNPACK
C2016–2019
Maratyszcza / NNPACK

NNPACK

Acceleration package for neural networks on multi-core CPUs

7Distinct people
10Mentions
0Explicit recommenders
1.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Acceleration package for neural networks on multi-core CPUs

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2016-03-24 18:35:52 UTC to 2019-02-12 15:12:28 UTC.

0123452016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC523
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC404
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101

What Hacker News says

10 sources
I'm playing a lot with VM, interpreters, JIT and recently compilers in Nim. Here is a JIT brainfuck VM: https://github.com/mratsim/jitterland Nim macros are extremely useful for assemblers and emulators as contrary to many codebases which needs to use an intermediate code generation step via text files [1][2][3] you can directly use them with type checking and all Nim facilities while keeping an easy to read syntax: https://github.com/numforge/laser/blob/e898f027/laser/photon... [1]: Xbyak - https://github.com/herumi/xbyak/blob/v5.751/gen/gen_avx512.c... [2]: NNPack + PeachPy - https://github.com/Maratyszcza/NNPACK/blob/af40ea7d/src/x86_... [3]: Apache Milagro Crypto - https://github.com/apache/incubator-milagro-crypto/blob/d43a...
In Show HN: Synesthesia – Optimizing brainfuck compiler implemented as Nim macros
>>> Softmax can be implemented as a composition of primitive TensorFlow ops (exponent, reduction, elementwise division, etc.): softmax = exp(logits) / reduce_sum(exp(logits), dim) No, it can not be implemented this way, it is numerically unstable, and will produce NaNs if any input is greater than ~88.7. Luckily, it is also not how its implemented in Tensorflow: https://github.com/tensorflow/tensorflow/blob/2c8d0dca978a24... For a clean (and more efficient) C version of this algorithm, take a look at NNPACK reference implementation: https://github.com/Maratyszcza/NNPACK/blob/master/src/ref/so...
In XLA: linear algebra library for TensorFlow
https://github.com/Maratyszcza/NNPACK/blob/master/src/x86_64... (from https://github.com/Maratyszcza/NNPACK) is also a pretty reasonable AVX2 GEMM implementation written in a Python assembler, it's a bit easier to follow than the OpenBLAS kernels and has very reasonable performance vs OpenBLAS/MKL. I second the guidance to just use a BLAS library. I'd guess you'd see a 2-10x speedup at least. It looks like you're only implementing a classical MLP library (which is fine for learning, but not the best choice for something like this, integrating VW into Redis would be a much better choice IMO).
In Intel will add deep-learning instructions to its processors
im2col + sgemm on CPU as in Caffe for instance is really slow; you are heavily penalized for extra memory traffic and the sgemm tile sizes are probably not well tuned for the problem size at hand. At the roofline of performance, the difference in both mem b/w and arithmetic throughput between CPU and GPU is only 5-10x (for fp32, Pascal fp16 is a different story of course), and proper implementations on the CPU will get you there. https://github.com/Maratyszcza/NNPACK
In Artificial Intelligence Software Is Booming, But Why Now?
I'm enthusiastic that Intel is working on optimizing Torch's Tensor and nn libraries, and optimizing Neural Nets in general. This repo is most definitely not ready for primetime. Two comments: 1. I haven't seen an Intel team that does non-trivial DNN optimizations, almost all the (multiple) teams that have worked on optimizing neural networks have worked on trivial stuff like adding OpenMP optimizations to existing code, and integrating MKL into existing frameworks. Usually adding OpenMP optimizations isn't as relevant, because one uses CPUs for neuralnet inference, on a server where multiple processes are running. Per-core efficiency is much more important than cute threadpool optimizations like OpenMP which look great in micro-benchmarks. The meaty and practically relevant optimizations have come from folks in the community like Andrew
Read the rest
Lavin and Marat Dukhan ( https://github.com/Maratyszcza/NNPACK ) which are focused more on optimizing both single-core efficiency as well as multi-core. 2. The way this fork integrates MKLDNN into Torch is not great, where they add MKLDNN fields into the core Tensor / Storage struct, which is not great from a broader perspective. I will try to reach out to the authors and make this more proper. p.s.: torch installs in a self-contained folder already as pointed by @gcr
In Optimized-Torch – Torch installation in a self-contained folder

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.