What are FX graph?

Why during the torch.compile, our codes convers to graph and then converts to optimized kernels? What are these graph for? Why does not Pytorch convert it to kernels directly?