Propagate dynamo dynamic_shapes config to backwards (#96771)
This fixes
```
File "/data/users/ezyang/a/pytorch/torch/_inductor/codegen/triton.py", line 1642, in codegen_node_schedule
indexing_dtype_strength_reduction(node._body)
File "/data/users/ezyang/a/pytorch/torch/_inductor/optimize_indexing.py", line 310, in indexing_dtype_strength_reduction
OptimizeIndexing(loop_body, indices, indexing).run()
File "/data/users/ezyang/a/pytorch/torch/_inductor/optimize_indexing.py", line 96, in __init__
self.replace_indirect(k, ValueRanges(0, v))
File "/data/users/ezyang/a/pytorch/torch/utils/_sympy/value_ranges.py", line 67, in __init__
upper = simple_sympify(upper)
File "/data/users/ezyang/a/pytorch/torch/utils/_sympy/value_ranges.py", line 33, in simple_sympify
assert not e.free_symbols, f"free variables NYI: {e}"
AssertionError: free variables NYI: s0
```
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96771
Approved by: https://github.com/eellison