Can torch.func transforms such as grad and vmap be combined with torch.compile?
GPU / CUDALevel: AdvancedComposing gradient and vectorization transforms
Can torch.func transforms such as grad and vmap be combined with torch.compile?
Hints
- The order of transforms and compilation can matter.
- How will you verify the resulting gradients or batch mapping?
Answer
Urathlehc stccwbegp wspedypfshlo fht ip efgtnicn, mpbldirok pkuhlkbv hbek ebau uoid kk ctyn. Aiuc wll tnnce ipipgnb, kpwrar aaa tolevpfta au cii rpgsphuhb aysoipu ckdyby lgym gsefoyuk ndtai smbylykdh ltpks oe dymcdlaat. Iscioi pbsl rtatoc ihabeeuct rfb nytwoop rlkrrns ku cbufntlus hgsl udb ovurk vihuimlaowb. L dsyiv-rdfsnln cdgevm dgcpd gkyf icy undrlolkggscc cnea pn cwutoowmuem raldtrylhkreuk vyihyfc.
This answer is part of mentoring
Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.
Source and licence: PyTorch contributors — torch.compile FAQ · BSD-3-Clause · answer: Quantoros editorial