Hi,
How can I find the return dtype of every aten function? I’m working on a delayed tensor, and I need the dtype to initialize my TensorImpl. But without executing the operation, I don’t have a way to knowing its dtype.
I’ve seen the file torch/share/ATen/Declarations.yaml, but it only mentions Tensor/Scalar as return type, but not the dtype.
The dtype of an op is mostly equal to its input tensor arguments, except for some that return booleans (e.g., eq/gt/ne, is*). Some ops also upcast, e.g. sum(bool) → long.
Is this information specified in a machine-readable way somewhere?
Worst case I was thinking of maybe writing a program that executes every single op with a singleton tensor of each of the dtypes and records the result. Could that work?
Thanks,
Nuno