Senior GPU Compiler Development Engineer
Systems, C++ and performancePosted 5 weeks agofrom NVIDIA's own hiring page
- Work type
- On-siteBengaluru, Pune
- Experience
- 8+ years
- Pay
- Not listed
- Posted
- 5 weeks ago
Skills it mentions
Add your skills to see which ones you have.
About the job
We are looking for an experience compiler engineer for an exciting role in the GPU Assembler team. Join the GPU Assembler team and help build tools that enable creation of most performant applications and libraries for HPC, DL and Autonomous Driving domain. Work with key HPC developers around the world to help them achieve the best performance & efficiency on current and next generation NVIDIA GPUs by developing best in industry Assembler and Code Analysis Tools. We will be part of a team that develops a core component of our platform for accelerating general purpose computation on the GPU. Disassembler (NVDISASM) developed by the team is used by all the CUDA users worldwide to analyze their binaries with various code analysis features built into the disassembler. Assembler is used for achieving the best performance for key DL applications.
What you will be doing:
- Lead design and development of NVIDIA’s Assembler and Disassembler for GPU compute.
- Work on binary analysis & instrumentation features like call graphs generation, program register usage and patching of GPU binaries
- Work with GPU architecture and debugger/profiler development teams to understand their requirements and deliver new features & product improvements.
- Collaborate closely with teams developing other related components to ensure compatibility, reliability, and high-quality code generation
- Working with customers/partners to collect feedback and drive innovative ideas and features to incorporate into the product
What we need to see:
- BS or MS degree in Computer Science, Computer Engineering, or related fields with 8+ years of experience in low-level system SW development and a minimum of 6 years of development in compilers, assemblers, binary utilities, binary analysis tools.
- Good analytical and C/C++ programming skills
- Experience in any one area of compiler development including feature support, code generation and compiler infrastructure.
- Good understanding of Assembly Language, Processor ISA (GPU ISA a plus) and processor architecture.
- Knowledge of object file formats such as ELF and debugging formats (DWARF).
Ways to stand out from the crowd:
- Understanding of debugger / profiler tools / bintools / Linker internals, experience in binary analysis / instrumentation tools like BOLT etc.
- Usage of AI tools in everyday work like Cursor, Codex, Claude etc.
- Knowledge of GPU development and compute APIs such as CUDA and OpenCL.
Interested?Senior GPU Compiler Development Engineer at NVIDIA
Apply on company site (opens in a new tab)The job ad ends here
Interview questions for this job6 with answers, on C and C++
Interview questions for this job
For the skills the ad mentions: C and C++.
How do function pointers in C work?C
Function pointers in C
Let's start with a basic function which we will be pointing to:
int addInt(int n, int m) { return n+m; }First thing, let's define a pointer to a function which receives 2
ints and returns anint:int (*functionPtr)(int,int);Now we can safely point to our function:
functionPtr = &addInt;Now that we have a pointer to the function, let's use it:
int sum = (*functionPtr)(2, 3); // sum == 5Passing the pointer to another function is basically the same:
int add2to3(int (*functionPtr)(int, int)) { return (*functionPtr)(2, 3); }We can use function pointers in return values as well (try to keep up, it gets messy):
// this is a function called functionFactory which receives parameter n // and returns a pointer to another function which receives two ints // and it returns another int int (*functionFactory(int n))(int, int) { printf("Got parameter %d", n); int (*functionPtr)(int,int) = &addInt; return functionPtr; }But it's much nicer to use a
typedef:typedef int (*myFuncDef)(int, int); // note that the typedef name is indeed myFuncDef myFuncDef functionFactory(int n) { printf("Got parameter %d", n); myFuncDef functionPtr = &addInt; return functionPtr; }From Stack Overflow: asked by Yuval Adam, answered by Yuval Adam (CC BY-SA 3.0)
Why can templates only be implemented in the header file?C++
Caveat: It is not necessary to put the implementation in the header file, see the alternative solution at the end of this answer.
Anyway, the reason your code is failing is that, when instantiating a template, the compiler creates a new class with the given template argument. For example:
template<typename T> struct Foo { T bar; void doSomething(T param) {/* do stuff using T */} }; // somewhere in a .cpp Foo<int> f;When reading this line, the compiler will create a new class (let's call it
FooInt), which is equivalent to the following:struct FooInt { int bar; void doSomething(int param) {/* do stuff using int */} };Consequently, the compiler needs to have access to the implementation of the methods, to instantiate them with the template argument (in this case
int). If these implementations were not in the header, they wouldn't be accessible, and therefore the compiler wouldn't be able to instantiate the template.A common solution to this is to write the template declaration in a header file, then implement the class in an implementation file (for example .tpp), and include this implementation file at the end of the header.
Foo.h
template <typename T> struct Foo { void doSomething(T param); }; #include "Foo.tpp"Foo.tpp
template <typename T> void Foo<T>::doSomething(T param) { //implementation }This way, implementation is still separated from declaration, but is accessible to the compiler.
Alternative solution
Another solution is to keep the implementation separated, and explicitly instantiate all the template instances you'll need:
Foo.h
// no implementation template <typename T> struct Foo { ... };Foo.cpp
// implementation of Foo's methods // explicit instantiations template class Foo<int>; template class Foo<float>; // You will only be able to use Foo with int or floatIf my explanation isn't clear enough, you can have a look at the C++ Super-FAQ on this subject.
From Stack Overflow: asked by MainID, answered by Luc Touraille (CC BY-SA 4.0)
Why does the C preprocessor interpret the word "linux" as the constant "1"?C
In the Old Days (pre-ANSI), predefining symbols such as
unixandvaxwas a way to allow code to detect at compile time what system it was being compiled for. There was no official language standard back then (beyond the reference material at the back of the first edition of K&R, 1978), and C code of any complexity was typically a complex maze of#ifdefs to allow for differences between systems. These macro definitions were generally set by the compiler itself, not defined in a library header file. Since there were no real rules about which identifiers could be used by the implementation and which were reserved for programmers, compiler writers felt free to use simple names likeunixand assumed that programmers would simply avoid using those names for their own purposes.The 1989 ANSI C standard introduced rules restricting what symbols an implementation could legally predefine. A macro predefined by the compiler could only have a name starting with two underscores, or with an underscore followed by an uppercase letter, leaving programmers free to use identifiers not matching that pattern and not used in the standard library.
As a result, any compiler that predefines
unixorlinuxis non-conforming, since it will fail to compile perfectly legal code that uses something likeint linux = 5;.As it happens, gcc is non-conforming by default -- but it can be made to conform (reasonably well) with the right command-line options:
gcc -std=c90 -pedantic ... # or -std=c89 or -ansi gcc -std=c99 -pedantic gcc -std=c11 -pedanticBy the time you read this, gcc will support newer editions of the C standard. See the gcc manual for more details.
gcc might phase out these definitions (
unix,linux, et al) in future releases, so you shouldn't write code that depends on them. If your program needs to know whether it's being compiled for a Linux target or not it can check whether__linux__is defined (assuming you're using gcc or a compiler that's compatible with it). See the GNU C preprocessor manual for more information.A largely irrelevant aside: the "Best One Liner" winner of the 1987 International Obfuscated C Code Contest, by David Korn (yes, the author of the Korn Shell) took advantage of the predefined
unixmacro:main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}It prints
"unix", but for reasons that have absolutely nothing to do with the spelling of the macro name.I don't want to post any spoilers here, and I encourage anyone reading this to try to understand that code on their own first. But if you really want to give up, I've posted an explanation here: https://gist.github.com/Keith-S-Thompson/6920347
From Stack Overflow: asked by ahmedaly50, answered by Keith Thompson (CC BY-SA 4.0)
Why is reading lines from stdin much slower in C++ than Python?C++
tl;dr: Because of different default settings in C++ requiring more system calls.
By default,
cinis synchronized with stdio, which causes it to avoid any input buffering. If you add this to the top of your main, you should see much better performance:std::ios_base::sync_with_stdio(false);Normally, when an input stream is buffered, instead of reading one character at a time, the stream will be read in larger chunks. This reduces the number of system calls, which are typically relatively expensive. However, since the
FILE*basedstdioandiostreamsoften have separate implementations and therefore separate buffers, this could lead to a problem if both were used together. For example:int myvalue1; cin >> myvalue1; int myvalue2; scanf("%d",&myvalue2);If more input was read by
cinthan it actually needed, then the second integer value wouldn't be available for thescanffunction, which has its own independent buffer. This would lead to unexpected results.To avoid this, by default, streams are synchronized with
stdio. One common way to achieve this is to havecinread each character one at a time as needed usingstdiofunctions. Unfortunately, this introduces a lot of overhead. For small amounts of input, this isn't a big problem, but when you are reading millions of lines, the performance penalty is significant.Fortunately, the library designers decided that you should also be able to disable this feature to get improved performance if you knew what you were doing, so they provided the
sync_with_stdiomethod. From this link (emphasis added):If the synchronization is turned off, the C++ standard streams are allowed to buffer their I/O independently, which may be considerably faster in some cases.
From Stack Overflow: asked by JJC, answered by Vaughn Cato (CC BY-SA 4.0)
What is ':-!!' in C?C
This is, in effect, a way to check whether the expression e can be evaluated to be 0, and if not, to fail the build.
The macro is somewhat misnamed; it should be something more like
BUILD_BUG_OR_ZERO, rather than...ON_ZERO. (There have been occasional discussions about whether this is a confusing name.)You should read the expression like this:
sizeof(struct { int: -!!(e); }))(e): Compute expressione.!!(e): Logically negate twice:0ife == 0; otherwise1.-!!(e): Numerically negate the expression from step 2:0if it was0; otherwise-1.struct{int: -!!(0);} --> struct{int: 0;}: If it was zero, then we declare a struct with an anonymous integer bitfield that has width zero. Everything is fine and we proceed as normal.struct{int: -!!(1);} --> struct{int: -1;}: On the other hand, if it isn't zero, then it will be some negative number. Declaring any bitfield with negative width is a compilation error.
So we'll either wind up with a bitfield that has width 0 in a struct, which is fine, or a bitfield with negative width, which is a compilation error. Then we take
sizeofthat field, so we get asize_twith the appropriate width (which will be zero in the case whereeis zero).Some people have asked: Why not just use an
assert?keithmo's answer here has a good response:
These macros implement a compile-time test, while assert() is a run-time test.
Exactly right. You don't want to detect problems in your kernel at runtime that could have been caught earlier! It's a critical piece of the operating system. To whatever extent problems can be detected at compile time, so much the better.
From Stack Overflow: asked by chmurli, answered by John Feminella (CC BY-SA 3.0)
Have you ever taken the initiative?Behavioural
Employers usually base questions on jobs you have done in the past. This gives you the chance to talk about your experience. For instance, they might ask:
- when have you faced a challenging situation?
- can you tell us about a personal achievement at work?
- have you ever taken the initiative?
- have you ever failed at a task?
Your answers should reflect the skills the employer wants. Be positive and tailor your examples to the job description.
If you don't have much work history, you can use examples from outside of work. You can also use examples from volunteering experience.
Use the STAR method to help structure your answers.From National Careers Service: interview advice (Open Government Licence v3.0)
Similar jobs
- Sr. C++ EngineerHarmonic Inc, Bengaluru, hybrid2 days ago
- Developer : C++/ADASBosch Group, Bengaluru, on-site3 days ago
- Software Engineer - C++, Networking(Layer2/Layer 3) | 4-8 YearsCisco, Bengaluru, on-site3 days ago
- HPC EngineerWeekday, Bengaluru, on-site4 days ago
More like this: C++ and systems jobs in Bengaluru (91), Jobs in Bengaluru (10,735) and C++ and systems jobs in India (161)



