3 ms·
Some of the most fun I have as a graduate student in computer architecture is trying to write the fastest possible code snippets for complicated chips. Working
by dwrodri 6y ago
Some of the most fun I have as a graduate student in computer architecture is trying to write the fastest possible code snippets for complicated chips. Working your way "down" from C/C++ is a great place to start, assuming you're familiar with either of those languages.
Take some collision detection algorithm for a game or some linear algebra kernel used in your machine learning model of preference.
If you're referencing a library that's already high-performance (e.g. Intel's MKL), what does the assembly look like? What's happening to your caches as the assembly is being executed? What are the trade-offs your compiler has to make when it comes to optimizations? How does Intel's compiler output differ from Clang? I mention these compilers in particular because they provide optimization reports.
My advisor guided me through "Computer Architecture: A Quantitative approach" by Hennessy & Patterson and it's been very eye-opening to pull back the curtain on the last logical layer of "magic" I had never fully understood. There's an enormous of amount of circuitry in the latest chip designs dedicating predicting the outcome of pending work so that we can "hide" the latency introduced by having to wait for data to arrive into the CPU core all the way from RAM. The way an instruction set architecture and compiler (e.g. x86-64, AArch64) unite to abstract away the work underneath is really one the coolest technical feats of the 20th century. Hopefully this inspires you (or anyone reading this) to go explore it. I think if you can document your exploration and communicate your findings effectively then that would be a great first step towards getting your bearings at a high level of how the "chip industry" operates.
As others here have mentioned, the chip industry is an enormous field and you could build an entire career around just the physical/mat.sci. side of fabrication for these chips. The physical side is still somewhat foreign to me, but I hope to explore it more in the years to come.
- 10000truths 6y agollvm-mca (https://llvm.org/docs/CommandGuide/llvm-mca.html https://llvm.org/docs/CommandGuide/llvm-mca.html) is an invaluable tool for this, by the way. It has a steep learning curve if you're not familiar with modern CPUs' instruction scheduling/pipelining quirks, but if you really need to micro-optimize some hot spot in your code, it will expose to you all the necessary information to do so. In particular, the timeline view feature visualizes the execution state of a series of instructions quite nicely.