text: Title: python custom ops tutorial stopped working in PyTorch 2.7 RC1
  Body: Get PyTorch 2.7 RC1. Repro in next comment.
  
  Error looks like:
  ```py
  Traceback (most recent call last):
    File "/home/rzou/dev/2.7/pco.py", line 124, in <module>
      cropped_img = f(img)
                    ^^^^^^
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_dynamo/eval_frame.py", line 655, in _fn
      return fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
    File "/home/rzou/dev/2.7/pco.py", line 120, in f
      @torch.compile(fullgraph=True)
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_dynamo/eval_frame.py", line 838, in _fn
      return fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_functorch/aot_autograd.py", line 1201, in forward
      return compiled_fn(full_args)
             ^^^^^^^^^^^^^^^^^^^^^^
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line
  328, in runtime_wrapper
      all_outs = call_func_at_runtime_with_args(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/utils.py", line 126, in cal
  l_func_at_runtime_with_args
      out = normalize_as_list(f(args))
                              ^^^^^^^
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line
  689, in inner_fn
      outs = compiled_fn(args)
             ^^^^^^^^^^^^^^^^^
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line
  495, in wrapper
      return compiled_fn(runtime_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/rzou/dev/2.7/env/lib/python3.11/site-packages/torch/_inductor/output_code.py", line 460, in __call__
      return self.current_callable(inputs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/torchinductor_rzou/oy/coy5shd4xlyzvhkrwtaiad5zxz7jhd654636vqhwxsyeux5q27d7.py", line 42, in call
      assert_size_stride(buf1, (3, 40, 40), (1600, 40, 1))
  AssertionError: expected size 3==3, stride 1==1600 at dim=0; expected size 40==40, stride 120==40 at dim=1; expected s
  ize 40==40, stride 3==1 at dim=2
  This error most often comes from a incorrect fake (aka meta) kernel for a custom op.
  Use torch.library.opcheck to test your custom op.
  See https://pytorch.org/docs/stable/library.html#torch.library.opcheck
  
  ```
  
  cc @ezyang @gchanan @kadeng @msaroufim @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @muchulee8 @amjames @chauhang @aakhundov