illustrates creating a new tensor type using an existing supported scalar type, which in this case is ScalarType::ComplexFloat.
Should/could supporting a new scalar type, say bfloat, int4, etc., be done through cpp extension or does it need to be added to the aten/c10 code in the PyTorch repo where the existing scalar types are defined (ScalarType.h, etc.)?
In either case, is there a tutorial or checklist for this?
I see that there is already some boilerplate code pertaining to complex float types. Things like ScalarType, TypeID, deferred/lazy registration of the complex types, etc.