Subblocks of Node

torch/csrc/jit/ir/ir.h explains the concept of sub-blocks of a node and state that inputs to a block that represent control flow act as equivalent phi-nodes by defining a new Value to represent any term that has multiple definitions depending on how control flowed.

Is there an example where I can see the creation of these new Values?


The easiest way to see example IR is to compile a small torchscript snippet using torch.jit.script() and calling .graph on the resulting object.