Repository: pytorch
Issue: basic_gnn_gcn: ERROR:common:TypeError: object of type 'GreaterThan' has no len()
Labels: triaged,ezyang's list,oncall: pt2,module: dynamic shapes,module: inductor

Repro:
```
python benchmarks/dynamo/torchbench.py --bfloat16 --accuracy --inference --device cuda  --export-aot-inductor  --only basic_gnn_gcn
```
Error:
```
ERROR:common:TypeError: object of type 'GreaterThan' has no len()
  target: aten.scalar_tensor.default
  args[0]: i18 >= 0
Traceback (most recent call last):
  File "/home/binbao/pytorch/benchmarks/dynamo/common.py", line 2107, in check_accuracy
    optimized_model_iter_fn = optimize_ctx(self.run_n_iterations)
  File "/home/binbao/pytorch/benchmarks/dynamo/common.py", line 1159, in export_aot_inductor
    module, exported, output_spec = AOTInductorModelCache.load(
  File "/home/binbao/pytorch/benchmarks/dynamo/common.py", line 1132, in load
    so_path, exported = torch._export.aot_compile(
  File "/home/binbao/pytorch/torch/_export/__init__.py", line 775, in aot_compile
    so_path = torch._inductor.aot_compile(unlifted_module, flat_example_inputs, options)  # type: ignore[arg-type]
  File "/home/binbao/pytorch/torch/_inductor/__init__.py", line 48, in aot_compile
    result = compile_fx_aot(
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 850, in compile_fx_aot
    return compile_fx(
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 951, in compile_fx
    return compile_fx(
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 980, in compile_fx
    return compile_fx(
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 1154, in compile_fx
    return inference_compiler(model_, example_inputs_)
  File "/home/binbao/pytorch/torch/_dynamo/utils.py", line 190, in time_wrapper
    r = func(*args, **kwargs)
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 1096, in fw_compiler_base
    return inner_compile(
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 211, in wrapper
    compiled = inner_compile(
  File "/home/binbao/local/miniconda3/envs/pytorch-3.10/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/binbao/pytorch/torch/_dynamo/repro/after_aot.py", line 80, in debug_wrapper
    inner_compiled_fn = compiler_fn(gm, example_inputs)
  File "/home/binbao/pytorch/torch/_inductor/debug.py", line 297, in inner
    return fn(*args, **kwargs)
  File "/home/binbao/local/miniconda3/envs/pytorch-3.10/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 340, in compile_fx_inner
    compiled_graph: CompiledFxGraph = fx_codegen_and_compile(
  File "/home/binbao/pytorch/torch/_inductor/compile_fx.py", line 535, in fx_codegen_and_compile
    graph.run(*example_inputs)
  File "/home/binbao/pytorch/torch/_dynamo/utils.py", line 190, in time_wrapper
    r = func(*args, **kwargs)
  File "/home/binbao/pytorch/torch/_inductor/graph.py", line 464, in run
    return super().run(*args)
  File "/home/binbao/pytorch/torch/fx/interpreter.py", line 138, in run
    self.env[node] = self.run_node(node)
  File "/home/binbao/pytorch/torch/_inductor/graph.py", line 735, in run_node
    result = super().run_node(n)
  File "/home/binbao/pytorch/torch/fx/interpreter.py", line 195, in run_node
    return getattr(self, n.op)(n.target, args, kwargs)
  File "/home/binbao/pytorch/torch/_inductor/graph.py", line 625, in call_function
    raise LoweringException(e, target, args, kwargs).with_traceback(
  File "/home/binbao/pytorch/torch/_inductor/graph.py", line 622, in call_function
    out = lowerings[target](*args, **kwargs)
  File "/home/binbao/pytorch/torch/_inductor/lowering.py", line 278, in wrapped
    out = decomp_fn(*args, **kwargs)
  File "/home/binbao/pytorch/torch/_inductor/lowering.py", line 2219, in tensor
    elif len(data) == 0 or isinstance(data[0], (float, int)) and len(data) <= 8:
torch._inductor.exc.LoweringException: TypeError: object of type 'GreaterThan' has no len()
  target: aten.scalar_tensor.default
  args[0]: i18 >= 0
```

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @ngimel @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @tugsbayasgalan