Hacker News new | past | comments | ask | show | jobs | submit login
Compiler Auto-Vectorization with Imitation Learning [pdf] (nips.cc)
88 points by chmaynard 13 days ago | hide | past | web | favorite | 12 comments





ML seems like a great approach for compiler optimizations, as hand-written heuristics have become almost unmaintainably complex. As the paper mentions, reinforcement learning could be even more powerful.

The biggest barrier to deploying this kind of thing is probably ML skepticism in the compiler world.


The agent, using a learned graph-DNN policy, produces a vectorization scheme that:

* has a 22.6% higher average reduction in cost compared to LLVM compiler (as measured with its own cost model); and

* achieves a geometric mean runtime speedup of 1.015× on the NAS benchmark suite when compared to LLVM’s SLP vectorizer.

In short, the DNN achieves better performance in an NP-Hard problem than human-tuned heuristics and human-designed algorithms.


"achieves a geometric mean runtime speedup of 1.015× on the NAS benchmark suite when compared to LLVM’s SLP vectorizer" sounds negligible?

It looks like they get up to a 26% increase in the static case. And for NAS they perform about as well (1.015x) as LLVM.

One hope that this might be able to improve a bit on the traditional problem you experience with optimizers: "will it still optimize if I move this calculation 1 line down?".

I find the big problem with optimizers these days is not performance anymore. I'd just so gladly trade even 2-3% performance for assurance that it's going to actually work, even if I move bits of code around a little bit. That it won't slow down by a factor 2-3x.


So, the advantage of this method is that it is practical and the closest one to a method that produces the optimal solution. Where the latter method is at risk of crazy compile times because it relies on solving a problem that is NP-hard?

I'm generally unclear about the utility here - goSLP which generates the training data seems to be significantly better at ~1.04. Is it because the NN might be faster?

It would be illuminating to see approximate compile times. The 1.015 number comes from 10 rollouts. Speedups are < 1 for 1 rollout. How long does goSLP take vs. LLVM?


does anyone know other areas of research at the intersection of ML and compilers/languages? obviously i'm aware of building in auto-diff (S4TF) and things like that but i mean outside of that and more things like this - where you use both ML and PL/compiler theory.

The title was unnecessarily editorialized?

The actual title is "Compiler Auto-Vectorization with Imitation Learning". It is currently titled "MIT researchers develop new technique to generate compiler optimizations [pdf]". Please don't do this.


The MIT news article is about the original performance prediction work, which is an important piece for future reinforcement learning-based approaches. (https://github.com/ithemal/Ithemal http://proceedings.mlr.press/v97/mendis19a.html). The imitation learning approach is a step towards how to automate the development of compiler algorithms. Note that we are not merely tuning heuristics, we learn the entire optimization algorithm.

So imitation learning w/graph NNs for auto-vectorization plus some MIT PR team editorializing?

The MIT news article is about the original performance prediction work, which is an important piece for future reinforcement learning-based approaches. https://github.com/ithemal/Ithemal http://proceedings.mlr.press/v97/mendis19a.html



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: