soumyarooproy:

Is it still an NN graph but with special conditional nodes? Or is it more of a code AST and the graph-level abstraction is lost?


I dont think they’re that different. Sure, the code AST means you have some constants, some scalars, some booleans, but for the large part you have Tensor computations. For example:
if dilation > 0:
    aten::dilated_convolution(...)
else:
    aten::convolution(...)

Currently torchscript has fundamental types of Tensors, tuples, lists, scalars, constants, None, and constant strings.
So you can theoretically make a python program out of it that doesn’t do neural network workloads, but for the large part you prob. will have a graph of Tensor operations.