by gaze · 5y ago · 0 comments
That is not totally true, there are two main things that can make kernels generated by this codegen faster:
- noalias, which is the LLVM equivalent of __restrict__, CUDA can take massive advantage of noalias by using readonly cache if the pointer does not alias. If you don't believe me just take a look at nvidia's blog post: https://developer.nvidia.com/blog/cuda-pro-tip-optimize-poin...
- CUDA builds all the .cu files and links the PTX of them together, this means no LTO happens by default. I do something different where i actually lazily-load every module using dependency graphs, which gives you the benefit of LTO by default. Its not perfect because right now it leaves behind a lot of dead code, but i know how to fix it.
You've reminded me of this classic, often (mis?)attributed to Mark Twain: [1]
> “Substitute 'damn' every time you're inclined to write 'very;' your editor will delete it and the writing will be just as it should be.”
[1] https://quoteinvestigator.com/2012/08/29/substitute-damn/
Best way to suggest is with a pull request.
If someone with copy editing experience made constructive suggestions for the readme and other documentation, it may well be appreciated.
A PR also gives the maintainers a way to discuss wording if there are points of disagreement - far more so than a post on HN that they may or may not even see.