6 ms·
This is literally insane. I've never heard of a neural net branch predictor. Edit: my layman knowledge about branch prediction and neural networks is showing i
by dingo_bat 10y ago
This is literally insane. I've never heard of a neural net branch predictor.
Edit: my layman knowledge about branch prediction and neural networks is showing its gross inadequacy :/
- nilved 10y agoe: was wrong about everything
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- xlayn 10y agoIf you have to pull an army of cores to fight two the really impressive arch belongs to Apple. OTOH I see this as the optimization of hardware to fix the cap that software, paradigms and devs mean.
- dingo_bat 10y agoAs long as the die area is same, I see it as a fair fight.
- pawadu 10y agoIn fact, for the same die size, Android hardware has been adapted to work better with the way Android works (many small processes working together). This is maybe not the best approach for certain games or benchmarks, but for normal use this has proven to be great.
- dingo_bat 10y agoI guess it's naive to assume that Apple isn't also doing the same thing. And apple's cores are bigger so they generally do more work per core per cycle. The exynos in GS7 has eight cores. But the die area is roughly same as apple's dual core chip.
- DannyBee 10y agoIt's actually really common these days. :) Search google for "hashed perceptron branch predictor"
- mbell 10y agoIntel (and probably AMD) have been using neural based approaches to branch prediction since the early 2000's. This isn't particularly new, it's just not a topic talked about much.
- gpderetta 10y ago[citation needed]. As far as I know, Intel is suspected to be using TAGE or some variant of it in its last few generations of chips.
- AstralStorm 10y agoGoogle for a PDF describing x86 architecture CPUs. There are ways to write a loop that will detect the kind of predictor in use.
- gpderetta 10y agoNo need, other people have already done the work: the paper 'Branch Prediction and the Performance of Interpreters' gave strong hints that Intel has been using ITTAGE at least since Haswell. Edit: also, Intel branch predictors up to Core2 were well characterized and were not believed to be using NN. [1] https://hal.inria.fr/hal-01100647/document https://hal.inria.fr/hal-01100647/document ,discussed last year at HN.
- gcr 10y agoBranch prediction strategies can be learned, just like any other model. I could certainly see something like this outperforming the huge bag of hand-tuned optimization strategies for branch prediction anyway. It could save some silicon. Even a simple dot product can be called a "neural network," albeit a small uninteresting one. Your features could be (say) the state of cache, the number of jumps, the number of recent stalls / stack size / returns, and so on. Put them into a 10-dimensional vector or whatever, take the dot product between that and a set of 10 learned weights, and preload the branch if the result is above some threshold. Even a simple model could perhaps work really well here. Of course it's not like they have some deep learning convolutional net running on the program input. I also bet the weights are set at the factory so it's not "learning" anything.
- medains 10y agoNothing in the article suggests that it's learning - so I suspect that the weights are indeed set in the factory. Learning on the fly would consume much more power as it back-propagates, so doesn't really make much sense as the potential performance gain would be marginal and would probably cause a performance hit when switching to a different process or thread.
- pawadu 10y agoBut if it is not learning, can you really call it NN?
- chas 10y agoYes. Most neural net applications separate training and inference so that once the net is in production it doesn't change, though it might be replaced with a new net rather frequently depending on how much the distribution of data it's operating on changes over time.
- pawadu 10y agonot an expert on this, but wouldn't what you mention be adaptive control rather than ANN?
- corysama 10y agoThe article indicates that academia has been writing about using them for branch prediction for a while and than Intel and AMD have been doing just that for a while. They just don't talk about it much. > AMD's Zen architect Mike Clark confirmed to us his microarchitecture uses a hashed perceptron system in its branch prediction. "Maybe I should have called it a neural net," he added. Neural networks can be very complicated, but they can also be very simple. What little I know about perceptrons is that they are very simple. If you google "hashed perceptron", many of the papers that come up mention branch prediction in their titles.
- verandaguy 10y agoNot necessarily. The cost of backtracking on a bad branch prediction on a device like a phone may be so great that implementing an ANN could be worth the effort to implement. I'm not as familiar with mobile phone architecture as with that of PCs, but the number and types of operations influenced by the device's various sensors (light sensor, GPS, accelerometer, gyroscope) could conceivably be more than normal, naïve branch prediction can handle effectively.
- gpderetta 10y agoWhy would speculation invalidation be more expensive on a phone? If anything, many phone CPUs tend to have shorter pipelines and less expensive branch prediction misses. Also I do not see how the number or quality of sensors could in any way affect the prediction rate.
- pawadu 10y agoIn addition, could this be worse than what we have today - on 64-bit ARM?
- flukus 10y agoFirst time I've heard of them in hardware. The JVM has been employing similar feats for many years now.
- zigzigzag 10y agoLike where? Even the best JVMs do basic counted profiling of branches only, as far as I know.
- pawadu 10y agoHave hotspot JVM optimization mechanisms ever been disclosed?
- zigzigzag 10y agoWhat? It's been open source for years!
- pawadu 10y agoI was under the impression that only some parts of the JVM was open and that the high performance server implementations have always been proprietary?
- pas 10y agoThe (old) Oracle JRockit is not really better. It was, but it was probably getting really troublesome to maintain, and with buying Sun they probably felt that it was rather redundant. (There was no need for a clean room implementation since they owned all relevant IP anyhow.)
- zigzigzag 10y agoNot at all.
- flukus 10y agoWith adaptive optimizing: https://en.wikipedia.org/wiki/Java_performance#Adaptive_optimizing https://en.wikipedia.org/wiki/Java_performance#Adaptive_opti...