[JIT] [Reland] add complexity tests (#35330)
Summary:
Relanding https://github.com/pytorch/pytorch/pull/34918
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35330
Differential Revision: D20633804
Pulled By: eellison
fbshipit-source-id: ce5cf45f53a25830141bedb759ff712a59a534c7