4 ms·
ExecuTorch developer here, agreed it's a huge pain to deal with if conditions right now. Part of the pain comes from the vast expressiveness of python on if con
by drag0nblad3 10mo ago
ExecuTorch developer here, agreed it's a huge pain to deal with if conditions right now. Part of the pain comes from the vast expressiveness of python on if condition, which causes all ML compiler a lot of headache to be able to capture a sound graph. The rest of the pain comes from the strict requirement of torch.compile itself (no mutation/aliasing behavior in the if branches), which in often times makes torch.cond hard to use or inefficient.
- fooblaster 10mo agoSo what are your users doing to get around this? Hoisting all control flow out?
- fooblaster 10mo agoAnd you wouldn't happen to know about a torchscript replacement that is currently in-flight that is not based on export?
- fooblaster 10mo agoAnyway, perhaps we can chat in the executorch discord.