Add prim::TypeCheck operation (#43026)
Summary:
TypeCheck is a new operation to check the shape of tensors against
expectd shapes. TypeCheck is a variadic operation. An example,
%t0 : Tensor = ...
%t1 : Tensor = ...
%2 : FLOAT(20, 20), %3 : FLOAT(30, 30), %1 : bool =
prim::TypeCheck(%t1, %t2)
prim::If(%1)
Fixes #{issue number}
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43026
Reviewed By: ZolotukhinM
Differential Revision: D23115830
Pulled By: bzinodev
fbshipit-source-id: fbf142126002173d2d865cf4b932dea3864466b4