
Ask HN: Is there a compiler powered by a neural net? - agluszak
OpenAI has recently shared a demo[1] where they &quot;translate&quot; English descriptions of tasks to Bash commands. I wonder if somebody experimented with using neural nets to compile code, i.e. to &quot;translate&quot; for example Java to JVM bytecode. The dataset for such neural net is easily obtainable and wouldn&#x27;t require manual labelling at all.<p>[1] - https:&#x2F;&#x2F;beta.openai.com&#x2F;?app=chat&amp;demo=5
======
bruce511
I'm not sure I understand what you are asking. Compiling English to bash
sounds like a thing because English is a very imprecise way of describing a
set of computational tasks.

Whereas java is the exact opposite. Every single command in java is precisely
defined, and does exactly what you tell it to do. Compilers already have 100%
effectiveness on doing this.

I am lead to assume that an AI would then compile "what I meant" and not "what
I wrote". I'm not sure that's helpful because that sounds like a great way to
get random, sometimes, bugs.

If you are getting errors from the compiler it is because your code is
imprecise - and the fix there is to make it more precise.

I may have misinterpreted your question, or lack the imagination to see where
you are going, so please feel free to expand on your point.

------
lamchob
In the area of AutoTuning some machine learning methods are used. The goal is
to optimize throughput or latency for compute intensive workloads. The machine
learning model is trained with performance measurements on the hardware and
then use it as proxy for real execution to try out different configurations.

Notable works:

AutoTVM - [https://arxiv.org/abs/1805.08166](https://arxiv.org/abs/1805.08166)

CHAMELEON - [https://deepai.org/publication/chameleon-adaptive-code-
optim...](https://deepai.org/publication/chameleon-adaptive-code-optimization-
for-expedited-deep-neural-network-compilation)

GPU-Warp Scheduling - [https://deepai.org/publication/rlws-a-reinforcement-
learning...](https://deepai.org/publication/rlws-a-reinforcement-learning-
based-gpu-warp-scheduler)

