Trying to understand flow for compilation

Hi, I’d like to understand how Inductor generates Triton kernels, starting from a function compiled with torch.compile all the way to a Triton kernel mapping. However, I’m kind of lost trying to find entry points. Even if there’s no end to end example, can anyone point out the order of files to look at (to understand what’s happening) ?

1 Like

Almost all the tracer and compiler are written in Python, so just drop a breakpoint() pretty much anywhere in torch/{_dynamo,_inductor} and follow the trace / backtrace :slight_smile:

1 Like