Hi,
I’m trying to understand how the compiler works and have been reading the documentation.
In the section on the with statement, I see that prim::Exit returns a Tensor in TorchScript graphs.
Why does prim::Exit have a return value at all?
I could be wrong, but it seems impossible for any other code to actually do anything with the return value.
CC @SplitInfinity who I think was involved in implementing the with statement.
My earlier statement was not completely accurate. __exit__ is allowed to return anything that can be interpreted as a boolean, which includes certain kinds of Tensors.