[StaticRuntime] Fix broken tests (#45813)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45813
Fix tests broken by D23996656 (https://github.com/pytorch/pytorch/commit/2b48dd168d846c864d4e12f9d66dc61be67fa811).
Test Plan:
```
buck test mode/opt //pytorch/tensorboardX:test_pytorchtb -- 'test_pytorch_graph \(pytorch\.tensorboardX\.tests\.test_pytorch_graph\.PytorchGraphTest\)'
buck test mode/opt //pytext/tests:
buck test mode/dev-nosan //mobile-vision/projects/detectron2go/tests:test_caffe2_compatibles
```
Reviewed By: yinghai
Differential Revision: D24100807
fbshipit-source-id: e2f92aadca4161f5cf9f552e922fb4d6500af3a4