TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learning to Superoptimize real-world programs

66 pointsby pramodbiligiriover 3 years ago

4 comments

mach1neover 3 years ago
I don&#x27;t understand the wording: &quot;Our method, SILO, superoptimizes programs an expected 6.2% of our test set when compared with the gcc version 10.3 compiler&#x27;s aggressive optimization level -O3.&quot;<p>Does that mean that the runtime is only 6.2% of the runtime after gcc optimization, or that there was a 6.2% reduction in runtime compared to gcc optimization?
评论 #28711745 未加载
WithinReasonover 3 years ago
I&#x27;m convinced that neural networks in compilers are the Next Big Thing in AI. e.g. GPUs are very difficult to program for mere mortals.
评论 #28710185 未加载
评论 #28710170 未加载
评论 #28709950 未加载
rep_lodsbover 3 years ago
Okay, had to register just because of the positive comments so far. I know nearly nothing about machine learning and may be a bit biased, but has anybody actually read the paper?<p>As I understand it, the model is trained on what compilers do anyway (the training data consists of compiler output from -O0 and -O3), so it won&#x27;t come up with the kind of clever tricks that a human might.<p>One of their cherry-picked examples (fig5, prstree_empty) is incorrect: in one branch it is supposed to return true if the value at rdi+0x10 is a null pointer, but in the optimized version it falls through from &quot;sete %al&quot; to the next instruction, which overwrites that register so it will always return true.<p>It would be easy to fix by inserting another return instruction, but this clearly shows the neural net doesn&#x27;t &quot;understand&quot; how to generate correct code. Besides some peephole optimizations, a lot of what it learned seems to be how to fool automated checks, and in this case even the authors who didn&#x27;t spot the bug.<p>See also the section about verifier exploits, which are embarassingly simple: a completely empty &quot;if statement&quot; which depends on memory causes a function to pass when it clearly does nothing more than always return false.<p>The 6.2% figure is after &quot;human verification&quot; (again, one of the examples in the paper is broken!), down from 8.3% using only the automated verifier.<p>Not impressed.
fulafelover 3 years ago
This sounds really promising. Could this be extended to other kinds of optimizations, eg data layout for memory traffic reduction?
评论 #28710190 未加载