Open re-xyr opened 2 years ago
Some points I gathered till now:
Unary/Binary/TernaryOp
s with funccalls.
Primitive
, Integral
, Floating
, etc.ExternalTensorShapeAlongAxis
is a very tricky one. Its typechecking is not checking types.
Expr
construct, namely ExternalTensorExpression
, which... seems not to have a type.ExternalTensorExpression
a type and 2) have an assertion that ExternalTensorExpression
will be the only construct to ever have this type.arg_id
of the tensor instead of the tensor itself.In all the current taichi typechecking is a quite atypical one. Some expressions (especially, non-primitive ones) don't even have types and maybe we should fix that first.
Hot take: If we're unable to give an Expr
a type, it probably should not be an Expr
at all, but some separate construct
It will be better if we are able to implement more operations (unary/binary ops) as internal functions instead of hard-coded operations. Because these operations are polymorphic on argument types (size & int/float) and perform implicit casts, we need to extend the functionalities of internal functions to allow type specification and polymorphism.
(cc @strongoier)