Currently, operators have different constructor signatures according to different numbers of input tensors. For example:
- UnaryOp(Tensor)
- BinaryOp(Tensor, Tensor)
- ReduceOp(List[Tensor])
Which causes a problem in
|
return cls(*inputs, **attributes).run() |
No matter which signature the constructor uses, the input tensors will be flattened and stored in inputs attribute of an Operator (with a type of List[Tensor]). When we need to reuse the saved inputs, it's hard to deal with different signatures separately. Maybe it's better to use a unified signature, like Op(List[Tensor])?
Currently, operators have different constructor signatures according to different numbers of input tensors. For example:
Which causes a problem in
hidet/python/hidet/graph/operator.py
Line 130 in 80a35d6
No matter which signature the constructor uses, the input tensors will be flattened and stored in
inputsattribute of an Operator (with a type of List[Tensor]). When we need to reuse the saved inputs, it's hard to deal with different signatures separately. Maybe it's better to use a unified signature, likeOp(List[Tensor])?