vision_maskrcnn: AssertionError: expected size 368==368, stride 156==28 at dim=0
Labels: triaged, oncall: pt2, module: dynamic shapes

### 🐛 Describe the bug

Perf runs of vision_maskrcnn are failing like this:

```
2023-07-05T08:43:42.4437803Z cuda train vision_maskrcnn                    
2023-07-05T08:44:17.7648116Z [2023-07-05 08:44:17,763] torch._inductor.utils: [WARNING] DeviceCopy in input program
2023-07-05T08:44:17.7656761Z [2023-07-05 08:44:17,765] torch._inductor.utils: [WARNING] DeviceCopy in input program
2023-07-05T08:44:17.7665486Z [2023-07-05 08:44:17,766] torch._inductor.utils: [WARNING] DeviceCopy in input program
2023-07-05T08:44:17.7675309Z [2023-07-05 08:44:17,767] torch._inductor.utils: [WARNING] DeviceCopy in input program
2023-07-05T08:44:17.7684606Z [2023-07-05 08:44:17,768] torch._inductor.utils: [WARNING] DeviceCopy in input program
2023-07-05T08:44:20.0071113Z Using FallbackKernel: aten.topk
2023-07-05T08:44:43.4110737Z [2023-07-05 08:44:43,409] torch.fx.experimental.symbolic_shapes: [WARNING] RecursionError in sympy.xreplace(Ne(Mod(2*(((s2 + 1)//2)), s2), 0), {s2: shape_0 + 3})
2023-07-05T08:44:44.8615715Z [2023-07-05 08:44:44,860] torch.fx.experimental.symbolic_shapes: [WARNING] RecursionError in sympy.xreplace(Eq(Mod(2*(((s2 + 1)//2)), s2), 0), {s2: shape_0 + 3})
2023-07-05T08:45:16.4014989Z [2023-07-05 08:45:16,400] torch.fx.experimental.symbolic_shapes: [WARNING] Ignored guard Eq(28, s1) == False, this could result in accuracy problems
2023-07-05T08:45:16.4028274Z [2023-07-05 08:45:16,402] torch.fx.experimental.symbolic_shapes: [WARNING] Ignored guard Ne(28, s1) == True, this could result in accuracy problems
2023-07-05T08:45:16.5794265Z [2023-07-05 08:45:16,578] torch.fx.experimental.symbolic_shapes: [WARNING] Ignored guard 28*s0 + s1 - 28 < 2147483648 == True, this could result in accuracy problems
2023-07-05T08:45:16.9219233Z ERROR:common:expected size 368==368, stride 156==28 at dim=0
2023-07-05T08:45:16.9219582Z Traceback (most recent call last):
2023-07-05T08:45:16.9219954Z   File "/var/lib/jenkins/workspace/benchmarks/dynamo/common.py", line 1957, in check_accuracy
2023-07-05T08:45:16.9220350Z     new_result = optimized_model_iter_fn(model_copy, example_inputs)
2023-07-05T08:45:16.9221158Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 295, in _fn
2023-07-05T08:45:16.9221496Z     return fn(*args, **kwargs)
2023-07-05T08:45:16.9228823Z   File "/var/lib/jenkins/workspace/benchmarks/dynamo/common.py", line 1782, in run_n_iterations
2023-07-05T08:45:16.9229669Z     self.model_iter_fn(mod, inputs, collect_outputs=False)
2023-07-05T08:45:16.9230380Z   File "/var/lib/jenkins/workspace/benchmarks/dynamo/torchbench.py", line 440, in forward_and_backward_pass
2023-07-05T08:45:16.9230756Z     cloned_inputs = clone_inputs(inputs)
2023-07-05T08:45:16.9231149Z   File "/var/lib/jenkins/workspace/benchmarks/dynamo/torchbench.py", line 441, in <resume in forward_and_backward_pass>
2023-07-05T08:45:16.9231517Z     self.optimizer_zero_grad(mod)
2023-07-05T08:45:16.9231882Z   File "/var/lib/jenkins/workspace/benchmarks/dynamo/torchbench.py", line 443, in <resume in forward_and_backward_pass>
2023-07-05T08:45:16.9232331Z     pred = mod(*cloned_inputs)
2023-07-05T08:45:16.9232957Z   File "/var/lib/jenkins/workspace/benchmarks/dynamo/torchbench.py", line 444, in <resume in forward_and_backward_pass>
2023-07-05T08:45:16.9233418Z     loss = self.compute_loss(pred)
2023-07-05T08:45:16.9233937Z   File "/var/lib/jenkins/workspace/benchmarks/dynamo/torchbench.py", line 445, in <resume in forward_and_backward_pass>
2023-07-05T08:45:16.9234638Z     self.grad_scaler.scale(loss).backward()
2023-07-05T08:45:16.9235695Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_tensor.py", line 491, in backward
2023-07-05T08:45:16.9236064Z     torch.autograd.backward(
2023-07-05T08:45:16.9236579Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/__init__.py", line 204, in backward
2023-07-05T08:45:16.9237031Z     Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
2023-07-05T08:45:16.9237999Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/autograd/function.py", line 274, in apply
2023-07-05T08:45:16.9238670Z     return user_fn(self, *args)
2023-07-05T08:45:16.9239324Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 3057, in backward
2023-07-05T08:45:16.9239687Z     out = call_compiled_backward()
2023-07-05T08:45:16.9240566Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 3032, in call_compiled_backward
2023-07-05T08:45:16.9240929Z     out = call_func_with_args(
2023-07-05T08:45:16.9241453Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 1457, in call_func_with_args
2023-07-05T08:45:16.9241842Z     out = normalize_as_list(f(args))
2023-07-05T08:45:16.9242311Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 295, in _fn
2023-07-05T08:45:16.9242652Z     return fn(*args, **kwargs)
2023-07-05T08:45:16.9243135Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/external_utils.py", line 17, in inner
2023-07-05T08:45:16.9243477Z     return fn(*args, **kwargs)
2023-07-05T08:45:16.9243946Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/codecache.py", line 326, in __call__
2023-07-05T08:45:16.9244406Z     return self.get_current_callable()(inputs)
2023-07-05T08:45:16.9244916Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 548, in run
2023-07-05T08:45:16.9245241Z     return model(new_inputs)
2023-07-05T08:45:16.9245743Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/codecache.py", line 353, in _run_from_cache
2023-07-05T08:45:16.9246303Z     return compiled_graph.compiled_artifact(inputs)
2023-07-05T08:45:16.9246770Z   File "/tmp/torchinductor_jenkins/z7/cz7ezmnxhztwnezszoxgk3cbs5k7htr4m3edlgmgpnwu4zbdb67d.py", line 160, in call
2023-07-05T08:45:16.9247191Z     assert_size_stride(tangents_6, (s0, s1), (28, 1))
2023-07-05T08:45:16.9247510Z AssertionError: expected size 368==368, stride 156==28 at dim=0
2023-07-05T08:45:16.9247863Z TorchDynamo optimized model failed to run because of following error
2023-07-05T08:45:16.9358249Z fail_to_run
```

Oddly, accuracy is passing though.

### Versions

master

cc @msaroufim @wconstab @bdhirsh @anijain2305