3 ms·
I'm not sure I completely agree and/or I misunderstand. Compilers are still not used for many compute intensive applications that have been around for a long t
by ekelsen 10y ago
I'm not sure I completely agree and/or I misunderstand.
Compilers are still not used for many compute intensive applications that have been around for a long time. On both CPUs and GPUs the fastest gemm, convolution kernels, md force field calculations (and many more) are all hand written assembly and are at least twice as fast, sometimes much more, than compiled Fortran or C code.
"In the end, they want and need the optimizing compiler to catch up and be able to optimize it well for the architectures." This hasn't happened, as far as I can tell, for the compute intensive kernels I just mentioned. With every new architecture we write new assembly.
- DannyBee 10y ago"Compilers are still not used for many compute intensive applications that have been around for a long time." ???? Citation needed :) My experience is exactly the opposite. "On both CPUs and GPUs the fastest gemm, convolution kernels, md force field calculations (and many more) are all hand written assembly and are at least twice as fast, sometimes much more, than compiled Fortran or C code." Ditto. This is completely not correct, AFAIK :) The fastest on GPU's is cublas, and even then, only in certain configs. gpucc (clang + cuda) and a normally compiled library we built for it already beats it for a lot of functions, and the only reason gpucc can't do better is because SASS is not open, so it generates PTX. If it was able to generate SASS, it'd win there too. On CPU's, the pluto generated code also beats the hand generated code for these functions pretty handily, see the papers, or, heck, try it yourself. This will happen for GPU's too sooner rather than later.
- ekelsen 10y agoCitations: - MKL (hand written assembly for most routines) - gotoBLAS (hand written assembly) - fastest gpu gemm library https://github.com/openai/openai-gemm https://github.com/openai/openai-gemm (hand written assembly) - fastest gpu conv libraries (cudnn/nervana neon - hand written assembly) - Gromacs gpucc is now basically in clang and I have not seen any gemm libraries written in CUDA C compiled by clang that are competitive. Or conv libraries. I also looked at Pluto and again see no comparisons to the MKL suggesting it is competitive. It increases the speed of a triple nested for loop by a factor of 4, which is still nowhere close to the speed of the MKL gemm.