
Recently, I've been sending out resumes, and I thought it would be a bit frustrating to send my two years of LLVM experience to SDE, so I looked to see if there were any compilers that I could use, and I looked at Nvidia, AMD, and Intel. In the end, Nvidia seemed to be the most aggressive, I submitted my resume on the first day and scheduled an interview on the second day, and I just received an invitation to the next round of interviews.
NVIDIA VO
The interviewer is a 12-year veteran of Nvidia, with a bit of an Indian/Central Asian accent, and I think he'll be the team leader after I start working there. Here's the chat.
At the beginning, it introduces what the group does. Roughly, it's about intermediate layer code optimization (IR Optimization), the bottom layer code optimization has a group of people who make chips, and the upper layer application has cuda and others (actually, I haven't heard of any other application except cuda, and I didn't write it down...). About five minutes.
Then I spent ten minutes talking about what I'd done on the last two LLVM-related projects on my resume. He wasn't too concerned about what I'd done other than LLVM, but more about what I'd written in LLVM.
After that, there are some trivial questions, you can see that the interviewer did not hold a mentality to test me, but step by step to find out what I know and what I don't know, and will patiently guide me on what I don't know (wall cracking praise).
LLVM related issues
"How familiar are you with LLVM". I don't know much about the front-end clang side, I've done a lot of work in the middle tier (IR) and read some code, and back-end code generation is just reading code and docs without getting my hands dirty.
Have you read the LLVM IR documentation, which I have? Do you knowgetelementptr
I explained this command to him and told him how I used it in a previous project. I further asked if you knew whatinbound
I said I didn't know this. He explained.getelementptr
It's essentially just an index for you, which can give you any number of strange results if you don't give it the right parameters. inbound
The modification guarantees that the result of the math will not be out of bounds.
"What compiler do you normally use", LLVM
"Have you read the optimization code?" No, but I know how it works.
"What do you know about optimization", this place talked a lot. Constant substitution, loop unrolling, function inline, code order substitution, and then asked about the motivation for loop unrolling and function inline. I'm not really familiar with this one, except for reducing jumps, and he gave me an example of removing a part of a branch and then doing an inline if the function parameter is a constant. He gave the example of removing a part of a branch if the function parameter is a constant, and then doing an inline.
What classes have you taken on compilation principles. I said I took compilation principles as an undergraduate, and the front-end was covered from finite automata, Lexical analysis to pushdown automata, parser, and semantic analysis for type systems. Intermediate code generation, back-end optimization, but more shallow. (Actually, I could brag that I wrote Stanford's COOL compiler from start to finish, but that's a bit of ancient history and not really necessary, I guess.) Then I took Programming languages (ECS 240) at Davis, which is more about CFG, DFG, static analysis, and code optimization. My brother didn't ask any further questions after hearing me talk about so many things, because he thought I was familiar with all of them.
C++ related issues
I was asked how C/C++ was. I'm not saying I haven't written thousands of lines, but it's not as comfortable as Rust, so I said that C++ is okay, not bug-free, but I can write and debug, and C++ is okay, but there's too much implicit semantics in C++ that I don't know where to get from without reading the docs. C++ has too many implicit semantics that I don't know without reading the documentation.
Then I asked about the basics of C/C++. I was really bad at this part. First I was asked about the size of two structs, the first one I could tell, and the second one I said 5, and then the interviewer asked me if I could give an example of the size of a struct. Dummy2[2]
What are the dimensions? Realize your mistake.
struct Dummy1 {
char (computing) c.
int i;
}
struct Dummy2 {
int i;
char (computing) c;
}
What is polymorphism, this I did answer; further asked me whether there is static polymorphism (static polymorphism), I thought you do not mean function overloading? He said yes.
application
The last one is kind of an application question. Say you wrote a compiler, compiled a 30-file application, and the application blew up, how do you debug it? I said to use a normal compiler first, and if the application blew up then it has nothing to do with my compiler. Otherwise, I'll test the front-end and back-end separately: I'll compile an IR and give it to the LLVM back-end; then I'll use the IR compiled by LLVM to give it to my back-end, and then I'll know whether the bug is in the front-end or the back-end. I'd say that's actually how I debugged the last time I had a similar problem.
The interviewer said that maybe my front-end output is fine, but it's not the same as LLVM, and the problem is actually in the back-end. I said this should not be the case, but I was assuming that the front-end results were consistent, and this assumption is not really justified. He said that the daily life of optimization is that the front-end results are not the same, debug half a day is the pot of the back-end, here seems to be my inexperience.
By this time, the appointment was actually 45 minutes away, but the few questions I asked froze the conversation for an hour.
If you're also preparing for the NVIDIA VO -- we can help!
The Programhelp team specializes in technical job interview assistance and service coverage:
OA Ghostwriting & High Frequency Questions
Coding Wheel Voice Assistance + Follow-up Solution Preparation
Debug & API Implementation Classes for hands-on training
System Design template building & API specification guidance
HM Interview Program Packaging & Behavior Interview Framework Training
We have helped several students land in popular Fintech & Infra firms in North America such as NVIDIA / Robinhood / Meta / Snowflake.