注册并分享邀请链接,可获得视频播放与邀请奖励。

Fei Peng
@fiigii
CUTLASS and CUDA Compiler at @NVIDIA. Dystopian.
加入 October 2010
994 正在关注    6.8K 粉丝
If you’ve done serious compiler optimization work on a product with a sufficiently large user base, you’ve almost certainly seen bug reports like this: “Why does this code compile into this assembly? There’s an obvious optimization opportunity here. Loop unrolling, LICM, etc. Why didn’t the compiler do it? If it did, my program would be faster. Please change the compiler so my program runs faster.” Very often, the answer is: “This isn’t really a compiler bug. It’s a heuristic. The transformation you’re asking for may indeed improve your program, but it could hurt performance in other cases or for other users. A compiler may have thousands or millions of users, and it has to preserve performance across an enormous variety of workloads. We can’t change an optimization policy just to make one program faster." This answer is 200% correct. I’ve lost count of how many times I’ve given some version of it myself. And yet, every time I say it, it’s one of the moments when I hate my job the most. As a user, why should I care about the compiler’s internal heuristics? Why should I care about the performance of everyone else’s programs? Why should I have to pay for something I don’t need? This needs to change.
显示更多
0
11
103
4
转发到社区