SpaceX2534 open jobs

Software Engineer, Kernels/CUDA (C++)

Systems, C++ and performancePosted 5 days agofrom SpaceX's own hiring page

Work type
On-siteSan Francisco Bay Area, Seattle
Experience
1+ years
Pay
$160k–250k a year
Posted
5 days ago
Before you apply: make your resume fit this job

Skills it mentions

Add your skills to see which ones you have.

Interview questions for this job6 with answers below, on C++, C, Linux and 1 more

About the job

SpaceX was founded under the belief that a future where humanity is out exploring the stars is fundamentally more exciting than one where we are not. Today SpaceX is actively developing the technologies to make this possible, with the ultimate goal of enabling human life on Mars.

SpaceXSI is building Super Intelligence to help humanity understand the universe. Our teams are building the full Super Intelligence stack: from our Colossus supercomputers, to Grok models, to our suite of applications, including Grok Bot, Grok Build, Grok Imagine, Grok Voice, and X. We're creating a powerful flywheel where more compute trains better models, better models power more useful products, and what we learn from people using those products shapes what we build next.

SOFTWARE ENGINEER, KERNELS/CUDA (C++)

We are building one of the world’s largest AI supercomputers from the ground up. As part of the Compute Infrastructure team, you will own both the raw GPU supercomputer and the platform layer that runs on top of it. You will work across the full stack — from low-level GPU kernel optimizations and Linux kernel internals to massive-scale orchestration and virtualization — to make training and inference at SpaceXSI as fast, reliable, and scalable as possible.
This is a broad, high-impact role that combines hardcore supercompute and compute infrastructure work. Your contributions will directly accelerate Grok’s training speed and overall AI progress.

RESPONSIBILITIES:

  • Design, build, and optimize massive GPU clusters for extreme-scale training and inference workloads
  • Develop and tune low-level CUDA kernels (GeMM, Attention, etc.), using CUTLASS, Tensor Cores, and Nsight for maximum performance
  • Profile, debug, and eliminate bottlenecks across GPU memory hierarchy, networking fabric, filesystems, and multi-GPU operation
  • Collaborate closely with AI research teams to deliver production-grade performance and scalability

BASIC QUALIFICATIONS:

  • 1+ years of experience with low-level system programming in C/C++

PREFERRED SKILLS AND EXPERIENCE:

  • Deep low-level systems programming (C/C++/PTX/SASS)
  • Strong experience with large-scale GPU clusters or distributed compute infrastructure at production scale
  • Hands-on work with GPU kernel optimization (CUTLASS, custom kernels, Nsight profiling)
  • Track record of building or running high-performance infrastructure for AI workloads (training or inference platforms)
  • Ability to reason from first principles and optimize for both memory-bound and compute-bound scenarios

COMPENSATION AND BENEFITS:

$160,000 - $250,000 USD

Your actual level and base salary will be determined on a case-by-case basis and may vary based on the following considerations: job-related knowledge and skills, education, and experience.

Base salary is just one part of your total rewards package at SpaceX. You may also be eligible for long-term incentives, in the form of company stock or long-term cash awards, as well as potential discretionary bonuses and the ability to purchase additional stock at a discount through an Employee Stock Purchase Plan. You will also receive access to comprehensive medical, vision, and dental coverage, access to a 401(k) retirement plan, short and long-term disability insurance, life insurance, paid parental leave, and various other discounts and perks. You may also accrue 3 weeks of paid vacation and will be eligible for 10 or more paid holidays per year. Employees accrue paid sick leave pursuant to Company policy which satisfies or exceeds the accrual, carryover, and use requirements of the law.

ITAR REQUIREMENTS:

  • To conform to U.S. Government export regulations, applicant must be a (i) U.S. citizen or national, (ii) U.S. lawful, permanent resident (aka green card holder), (iii) Refugee under 8 U.S.C. § 1157, or (iv) Asylee under 8 U.S.C. § 1158, or be eligible to obtain the required authorizations from the U.S. Department of State. Learn more about the ITAR here.  

SpaceX is an Equal Opportunity Employer; employment with SpaceX is governed on the basis of merit, competence and qualifications and will not be influenced in any manner by race, color, religion, gender, national origin/ethnicity, veteran status, disability status, age, sexual orientation, gender identity, marital status, mental or physical disability or any other legally protected status.

Applicants wishing to view a copy of SpaceX’s Affirmative Action Plan for veterans and individuals with disabilities, or applicants requiring reasonable accommodation to the application/interview process should reach out to EEOCompliance@spacex.com. 

Interested?Software Engineer, Kernels/CUDA (C++) at SpaceX

Apply on company site (opens in a new tab)

The job ad ends here

Interview questions for this job6 with answers, on C++, C, Linux and 1 more

Interview questions for this job

For the skills the ad mentions: C++, C, Linux and Networking.

563 questions
  • What are the basic rules and idioms for operator overloading?C++

    Common Operators to Overload

    Most of the work in overloading operators is boilerplate code. That is little wonder, since operators are merely syntactic sugar. Their actual work could be done by (and often is forwarded to) plain functions. But it is important that you get this boilerplate code right. If you fail, either your operator’s code won’t compile, your users’ code won’t compile, or your users’ code will behave surprisingly.

    Assignment Operator

    There's a lot to be said about assignment. However, most of it has already been said in GMan's famous Copy-And-Swap FAQ, so I'll skip most of it here, only listing the perfect assignment operator for reference:

    X& X::operator=(X rhs)
    {
      swap(rhs);
      return *this;
    }
    

    Stream Insertion and Extraction

    Disclaimer
    For overloading << and >> as bitwise shift operators, skip to the section Binary Arithmetic Operators.

    The bitwise shift operators << and >>, although still used in hardware interfacing for the bit-manipulation functions they inherit from C, have become more prevalent as overloaded stream input and output operators in most applications.

    The stream operators, among the most commonly overloaded operators, are binary infix operators for which the syntax does not specify any restriction on whether they should be members or non-members. However, their left operands are streams from the standard library, and you cannot add member functions to those1, so you need to implement these operators for your own types as non-member functions2. The canonical forms of the two are these:

    std::ostream& operator<<(std::ostream& os, const T& obj)
    {
      // Write obj to stream
      return os;
    }
    std::istream& operator>>(std::istream& is, T& obj)
    {
      // Read obj from stream
      if( /* no valid object of T found in stream */ )
        is.setstate(std::ios::failbit);
      return is;
    }
    

    When implementing operator>>, manually setting the stream’s state is only necessary when the reading itself succeeded, but the result is not what would be expected.

    1 Note that some of the << overloads of the standard library are implemented as member functions, and some as free functions. Only the locale-dependent functions are member functions, such as operator<<(long).

    2 According to the rules of thumb, the insertion/extraction operators should be member functions because they modify the left operand. However, we cannot follow the rules of thumb here.

    Function Call Operator

    The function call operator, used to create function objects, also known as functors, must be defined as a member function, so it always has the implicit this argument of member functions. Other than this, it can be overloaded to take any number of additional arguments, including zero.

    Here's an example of the syntax:

    struct X {
        // Overloaded call operator
        int operator()(const std::string& y) {
            return /* ... */;
        }
    };
    

    Usage:

    X f;
    int a = f("hello");
    

    Throughout the C++ standard library, function objects are always copied. Your own function objects should therefore be cheap to copy. If a function object absolutely needs to use data which is expensive to copy, it is better to store that data elsewhere and have the function object refer to it.

    Comparison Operators

    Read the rest at the sourceFrom Stack Overflow: asked by sbi, answered by sbi (CC BY-SA 4.0)

  • 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 an int:

    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 == 5
    

    Passing 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)

  • How can I replace a string in a file(s)?Linux

    1. Replacing all occurrences of one string with another in all files in the current directory:

    These are for cases where you know that the directory contains only regular files and that you want to process all non-hidden files. If that is not the case, use the approaches in 2.

    All sed solutions in this answer assume the sed implementation from GNU, NetBSD, OpenBSD, ast-open which process the -i option the same way perl does. If using FreeBSD's sed implementation (as also found on macOS or DragonFly BSD), replace -i with -i ''. Also note that the use of the -i switch with any version of sed has certain filesystem security implications and is inadvisable in any script which you plan to distribute in any way.

    • Non-recursive, non-hidden files in this directory only:

      perl -i -pe 's/foo/bar/g' ./* 
      sed -i 's/foo/bar/g' ./*
      
    • Recursive, regular files (including hidden ones) in this and all subdirectories

      find . -type f -exec perl -i -pe 's/foo/bar/g' {} +
      find . -type f -exec sed -i 's/foo/bar/g' {} +
      

      If you are using zsh:

      perl -i -pe 's/foo/bar/g' ./**/*(D.)
      sed -i 's/foo/bar/g' ./**/*(D.)
      

      (may fail if the list is too big, see zargs to work around).

      Bash did add support for zsh's recursive globbing (though only working properly with regards to symlinks in 5.0 or newer) but can't check directly for regular files, a loop is needed (parenthesis avoid setting the options globally):

      ( shopt -s globstar dotglob
          for file in **; do
              if [[ -f $file && ! -L $file ]]; then
                  sed -i 's/foo/bar/g' "./$file"
              fi
          done
      )
      

      The files are selected when they are regular files (-f) excluding symlinks (-L) resolving to regular files like the other approaches above do (sed/perl would break symlinks).

    2. Replace only if the file name matches another string / has a specific extension / is of a certain type etc:

    • Non-recursive, files in this directory only:

      sed -i -- 's/foo/bar/g' *baz*    ## all files whose name contains baz
      sed -i -- 's/foo/bar/g' *.baz    ## files ending in .baz
      

      (using the -- option delimiter rather than ./ prefix works here as the filenames are guaranteed not to be - and makes the argument list shorter, less likely to break the system limit on the size of the arguments)

    • Recursive, regular files in this and all subdirectories

      find . -name '*baz*' -type f -exec sed -i 's/foo/bar/g' {} +
      

      If you are using zsh:

      sed -i -- 's/foo/bar/g' **/*baz*(D.)
      sed -i -- 's/foo/bar/g' **/*.baz(D.)
      

      If you are using bash 5.0+, adapt the loop above and replace ** with **baz* or **.baz.

      Again -- can be used here in place of prefixing each argument with ./.

    • If a file is of a certain type, for example, executable (see man find for more options):

      find . -type f -executable -exec sed -i 's/foo/bar/g' {} +
      

      With zsh:

      sed -i 's/foo/bar/g' ./**/*(D*)
      

    3. Replace only if the string is found in a certain context

    Read the rest at the sourceFrom Unix & Linux Stack Exchange: asked by terdon, answered by terdon (CC BY-SA 4.0)

  • Why and how are Ethernet Vlans tagged?Networking

    If you have more than one VLAN on a port (a "trunk port"), you need some way to tell which packet belongs to which VLAN on the other end. To do this you are "tagging" a packet with a VLAN tag (or VLAN header if you like). In reality a VLAN tag is inserted in the Ethernet frame like this:

    The 802.1Q (dot1q, VLAN) tag contains a VLAN-ID and other things explained in the 802.1Q Standard. The first 16 bits contain the "Tag Protocol Identifier" (TPID) which is 8100. This also doubles as the EtherType 0x8100 for devices that don't understand VLANs.

    So a "tagged" packet contains the VLAN information in the Ethernet frame while an "untagged" packet doesn't. A typical use case would be if you have one port from a router to a switch which multiple customers are attached to:

    In this example customer "Green" has VLAN 10 and Customer "Blue" has VLAN 20. The ports between switch and customers are "untagged" meaning for the customer the arriving packet is just a normal Ethernet packet.

    The port between router and switch is configured as a trunk port so that both router and switch know which packet belongs to which customer VLAN. On that port the Ethernet frames are tagged with the 802.1Q tag.

    From Network Engineering Stack Exchange: asked by Vishwanath gowda k, answered by Sebastian Wiesinger (CC BY-SA 3.0)

  • What are the differences between a pointer variable and a reference variable?C++
    1. A pointer can be re-assigned:

      int x = 5;
      int y = 6;
      int *p;
      p = &x;
      p = &y;
      *p = 10;
      assert(x == 5);
      assert(y == 10);
      

      A reference cannot be re-bound, and must be bound at initialization:

      int x = 5;
      int y = 6;
      int &q; // error
      int &r = x;
      
    2. A pointer variable has its own identity: a distinct, visible memory address that can be taken with the unary & operator and a certain amount of space that can be measured with the sizeof operator. Using those operators on a reference returns a value corresponding to whatever the reference is bound to; the reference’s own address and size are invisible. Since the reference assumes the identity of the original variable in this way, it is convenient to think of a reference as another name for the same variable.

      int x = 0;
      int &r = x;
      int *p = &x;
      int *p2 = &r;
      assert(p == p2); // &x == &r
      assert(&p != &p2);
      
    3. It is possible to create a pointer to a pointer, but not a pointer to a reference.

       int **pp; // OK, pointer to pointer
       int &*pr; // ill-formed, pointer to reference
      
    4. It is possible to create an array of pointers, but not an array of references.

      int *ap[]; // OK, array of pointers
      int &ar[]; // ill-formed, array of references
      
    5. You can have arbitrarily nested pointers to pointers offering extra levels of indirection. References only offer one level of indirection because references to references collapse.

      int x = 0;
      int y = 0;
      int *p = &x;
      int *q = &y;
      int **pp = &p;
      **pp = 2;
      pp = &q; // *pp is now q
      **pp = 4;
      assert(y == 4);
      assert(x == 2);
      
    6. A pointer can be assigned nullptr, whereas a reference must be bound to an existing object. If you try hard enough, you can bind a reference to nullptr, but this is undefined and will not behave consistently.

      /* the code below is undefined; your compiler may optimise it
       * differently, emit warnings, or outright refuse to compile it */
      int &r = *static_cast<int *>(nullptr);
      // prints "null" under GCC 10
      std::cout
          << (&r != nullptr
              ? "not null" : "null")
          << std::endl;
      bool f(int &r) { return &r != nullptr; }
      // prints "not null" under GCC 10
      std::cout
          << (f(*static_cast<int *>(nullptr))
              ? "not null" : "null")
          << std::endl;
      

      You can, however, have a reference to a pointer whose value is nullptr.

    7. Pointers are ContiguousIterators (of an array). You can use ++ to go to the next item that a pointer is pointing to, and + 4 to go to the 5th element.

    8. A pointer needs to be dereferenced with * to access the object it points to, whereas a reference can be used directly. A pointer to a class/struct uses -> to access its members whereas a reference uses a ..

    9. Const references and rvalue references can be bound to temporaries (see temporary materialization). Pointers cannot (not without some indirection):

      const int &x = int(12); // legal C++
      int *y = &int(12); // illegal to take the address of a temporary.
      

      This makes const & more convenient to use in argument lists and so forth.

    From Stack Overflow: asked by prakash, answered by Brian R. Bondy (CC BY-SA 4.0)

  • Do you have any weaknesses?Behavioural

    You should be honest when answering questions on your weaknesses. Say how you're working to improve them.

    Example

    Question - "Do you have any weaknesses?"

    Answer - "I struggle with time management on projects. To make sure I stick to the time frame I'm creating a timetable of steps at the start of each project".

    From National Careers Service: interview advice (Open Government Licence v3.0)

Similar jobs

More like this: C++ and systems jobs in San Francisco Bay Area (50), Jobs in San Francisco Bay Area (9,193) and C++ and systems jobs in the USA (107)