Repository: pytorch
Issue: Inductor pattern matcher - missing val 
Labels: triaged,oncall: pt2,module: inductor

### 🐛 Describe the bug

Stacktrace

~~~
File "/home/anijain/local/sam2/notebooks/ued.py", line 104, in <module>
    masks, scores, logits = predictor.predict(
                            ^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/sam2/sam2/sam2_image_predictor.py", line 315, in predict
    output_path = torch._inductor.aoti_compile_and_package(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/__init__.py", line 101, in aoti_compile_and_package
    return aoti_compile_and_package_debug_wrapper(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/__init__.py", line 180, in aoti_compile_and_package_debug_wrapper
    raise e
  File "/home/anijain/local/pytorch3/torch/_inductor/__init__.py", line 158, in aoti_compile_and_package_debug_wrapper
    return _aoti_compile_and_package_inner(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/__init__.py", line 130, in _aoti_compile_and_package_inner
    aoti_files = aot_compile(m, args, kwargs, options=inductor_configs)  # type: ignore[arg-type]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/__init__.py", line 286, in aot_compile
    return compile_fx_aot(
           ^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/compile_fx.py", line 1247, in compile_fx_aot
    compiled_lib_path = compile_fx(
                        ^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/compile_fx.py", line 1428, in compile_fx
    return compile_fx(
           ^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/compile_fx.py", line 1470, in compile_fx
    return compile_fx(
           ^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/compile_fx.py", line 1701, in compile_fx
    return inference_compiler(unlifted_gm, example_inputs_)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/compile_fx.py", line 1525, in fw_compiler_base
    return _fw_compiler_base(model, example_inputs, is_inference)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/compile_fx.py", line 1534, in _fw_compiler_base
    _recursive_joint_graph_passes(model)
  File "/home/anijain/local/pytorch3/torch/_inductor/compile_fx.py", line 341, in _recursive_joint_graph_passes
    joint_graph_passes(gm)
  File "/home/anijain/local/pytorch3/torch/_inductor/fx_passes/joint_graph.py", line 468, in joint_graph_passes
    ).apply_graph_pass(patterns.apply)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/fx/passes/graph_transform_observer.py", line 70, in apply_graph_pass
    return pass_fn(self.gm.graph)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/pattern_matcher.py", line 1776, in apply
    entry.apply(m, graph, node)  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anijain/local/pytorch3/torch/_inductor/pattern_matcher.py", line 1045, in apply
    self.handler(match, *match.args, **match.kwargs)
  File "/home/anijain/local/pytorch3/torch/_inductor/fx_passes/joint_graph.py", line 575, in pointless_view
    arg_size = list(node.args[0].meta["val"].shape)  # type: ignore[union-attr]
                    ~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'val'
~~~

Repro instructions are here - https://docs.google.com/document/d/19_pBaIkQl8PRd-m-4TZB_EAm3nsFlqG8-WZ6BwWp888/edit?tab=t.0

Its very possible that some pass is not propagating fake tensor info.

### Error logs

NA

### Versions

NA

cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @aakhundov