torch._dynamo.exc.InternalTorchDynamoError: SymNodeVariable() is not a constant on DynamicShapesMiscTests.test_slice_input
Labels: triaged, oncall: pt2, module: dynamic shapes

### 🐛 Describe the bug

```
__________________________________________ DynamicShapesMiscTests.test_slice_input __________________________________________
Traceback (most recent call last):
  File "/data/users/ezyang/b/pytorch/test/dynamo/test_misc.py", line 1999, in test_slice_input
    res2 = opt_getitem(layers, slice(3, 8, 2))
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/eval_frame.py", line 295, in _fn
    return fn(*args, **kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/eval_frame.py", line 448, in catch_errors
    return callback(frame, cache_size, hooks, frame_state)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/convert_frame.py", line 127, in _fn
    return fn(*args, **kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/convert_frame.py", line 360, in _convert_frame_assert
    return _compile(
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/utils.py", line 180, in time_wrapper
    r = func(*args, **kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/convert_frame.py", line 515, in _compile
    raise InternalTorchDynamoError(str(e)).with_traceback(e.__traceback__) from None
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/convert_frame.py", line 430, in _compile
    out_code = transform_code_object(code, transform)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/bytecode_transformation.py", line 1000, in transform_code_object
    transformations(instructions, code_options)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/convert_frame.py", line 415, in transform
    tracer.run()
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/symbolic_convert.py", line 2025, in run
    super().run()
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/symbolic_convert.py", line 708, in run
    and self.step()
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/symbolic_convert.py", line 668, in step
    getattr(self, inst.opname)(inst)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/symbolic_convert.py", line 390, in wrapper
    return inner_fn(self, inst)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/symbolic_convert.py", line 161, in impl
    self.push(fn_var.call_function(self, self.popn(nargs), {}))
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/builtin.py", line 577, in call_function
    result = handler(tx, *args, **kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/builtin.py", line 883, in call_getitem
    return args[0].call_method(tx, "__getitem__", args[1:], kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/lists.py", line 346, in call_method
    return super().call_method(tx, name, args, kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/lists.py", line 307, in call_method
    return super().call_method(tx, name, args, kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/lists.py", line 95, in call_method
    return self.getitem_const(args[0])
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/lists.py", line 64, in getitem_const
    index = arg.as_python_constant()
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/lists.py", line 607, in as_python_constant
    return slice(*[x.as_python_constant() for x in self.items])
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/lists.py", line 607, in <listcomp>
    return slice(*[x.as_python_constant() for x in self.items])
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/variables/base.py", line 150, in as_python_constant
    raise NotImplementedError(f"{self} is not a constant")
torch._dynamo.exc.InternalTorchDynamoError: SymNodeVariable() is not a constant
from user code:
   File "/data/users/ezyang/b/pytorch/test/dynamo/test_misc.py", line 1984, in getitem
    a[idx]
Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information
You can suppress this exception and fall back to eager by setting:
    import torch._dynamo
    torch._dynamo.config.suppress_errors = True
```

when run with `automatic_dynamic_shapes=True`

### Versions

main

cc @msaroufim @wconstab @bdhirsh @anijain2305