text: Title: IndexError in linear_binary when X and Y are the same with max-autotune enabled
  Body: ### 🐛 Describe the bug
  
  When the x and y are the same in the inputs with max-autotune enabled, an index error occurs.
  Simple reproducer:
  ```
  class Model(torch.nn.Module):
      def __init__(self):
          super().__init__()
          self.linear = torch.nn.Linear(1024, 1024)
  
      def forward(self, input):
          out = self.linear(input)
          out = out + input
          return out
  
  if __name__ == "__main__":
  
          input = torch.randn(1024, 1024)
          m = Model().eval()
          dtype = torch.bfloat16
          input = input.to(dtype)
  
          with torch.autocast(enabled=True, device_type="cpu", dtype=dtype):
              c_m = torch.compile(m, mode="max-autotune")
              inductor_res = c_m(input)
  ```
  
  ```
  Traceback (most recent call last):
    File "pytorchs/test/test_linear.py", line 72, in <module>
      inductor_res = c_m(input)
    File "pytorchs/pytorch/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
      return self._call_impl(*args, **kwargs)
    File "pytorchs/pytorch/torch/nn/modules/module.py", line 1762, in _call_impl
      return forward_call(*args, **kwargs)
    File "pytorchs/pytorch/torch/_dynamo/eval_frame.py", line 663, in _fn
      raise e.remove_dynamo_frames() from None  # see TORCHDYNAMO_VERBOSE=1
    File "pytorchs/pytorch/torch/_dynamo/output_graph.py", line 1544, in _call_user_compiler
      raise BackendCompilerFailed(
    File "pytorchs/pytorch/torch/_dynamo/output_graph.py", line 1519, in _call_user_compiler
      compiled_fn = compiler_fn(gm, self.example_inputs())
    File "pytorchs/pytorch/torch/_dynamo/repro/after_dynamo.py", line 150, in __call__
      compiled_gm = compiler_fn(gm, example_inputs)
    File "pytorchs/pytorch/torch/__init__.py", line 2349, in __call__
      return compile_fx(model_, inputs_, config_patches=self.config)
    File "pytorchs/pytorch/torch/_inductor/compile_fx.py", line 1745, in compile_fx
      return compile_fx(
    File "pytorchs/pytorch/torch/_inductor/compile_fx.py", line 2103, in compile_fx
      return aot_autograd(
    File "pytorchs/pytorch/torch/_dynamo/backends/common.py", line 101, in __call__
      cg = aot_module_simplified(gm, example_inputs, **self.kwargs)
    File "pytorchs/pytorch/torch/_functorch/aot_autograd.py", line 1160, in aot_module_simplified
      compiled_fn = AOTAutogradCache.load(
    File "pytorchs/pytorch/torch/_functorch/_aot_autograd/autograd_cache.py", line 775, in load
      compiled_fn = dispatch_and_compile()
    File "pytorchs/pytorch/torch/_functorch/aot_autograd.py", line 1145, in dispatch_and_compile
      compiled_fn, _ = create_aot_dispatcher_function(
    File "pytorchs/pytorch/torch/_functorch/aot_autograd.py", line 570, in create_aot_dispatcher_function
      return _create_aot_dispatcher_function(
    File "pytorchs/pytorch/torch/_functorch/aot_autograd.py", line 820, in _create_aot_dispatcher_function
      compiled_fn, fw_metadata = compiler_fn(
    File "pytorchs/pytorch/torch/_functorch/_aot_autograd/jit_compile_runtime_wrappers.py", line 219, in aot_dispatch_base
      compiled_fw = compiler(fw_module, updated_flat_args)
    File "pytorchs/pytorch/torch/_inductor/compile_fx.py", line 1643, in fw_compiler_freezing
      optimized_function = inner_compile(
    File "miniforge3/envs/ecao/lib/python3.10/contextlib.py", line 79, in inner
      return func(*args, **kwds)
    File "pytorchs/pytorch/torch/_inductor/compile_fx.py", line 628, in compile_fx_inner
      return wrap_compiler_debug(_compile_fx_inner, compiler_name="inductor")(
    File "pytorchs/pytorch/torch/_dynamo/repro/after_aot.py", line 124, in debug_wrapper
      inner_compiled_fn = compiler_fn(gm, example_inputs)
    File "pytorchs/pytorch/torch/_inductor/compile_fx.py", line 735, in _compile_fx_inner
      mb_compiled_graph = fx_codegen_and_compile(
    File "pytorchs/pytorch/torch/_inductor/compile_fx.py", line 1309, in fx_codegen_and_compile
      return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs)
    File "pytorchs/pytorch/torch/_inductor/compile_fx.py", line 1128, in codegen_and_compile
      graph.run(*example_inputs)
    File "pytorchs/pytorch/torch/_inductor/graph.py", line 879, in run
      return super().run(*args)
    File "pytorchs/pytorch/torch/fx/interpreter.py", line 171, in run
      self.env[node] = self.run_node(node)
    File "pytorchs/pytorch/torch/_inductor/graph.py", line 1529, in run_node
      result = super().run_node(n)
    File "pytorchs/pytorch/torch/fx/interpreter.py", line 240, in run_node
      return getattr(self, n.op)(n.target, args, kwargs)
    File "pytorchs/pytorch/torch/_inductor/graph.py", line 1125, in call_function
      return target(*args, **kwargs)
    File "pytorchs/pytorch/torch/_inductor/fx_passes/mkldnn_fusion.py", line 620, in fn
      return L[fusion_op](*computation_args)
    File "pytorchs/pytorch/torch/_inductor/lowering.py", line 466, in wrapped
      out = decomp_fn(*args, **kwargs)
    File "pytorchs/pytorch/torch/_inductor/mkldnn_lowerings.py", line 349, in linear_binary
      result = autotune_select_algorithm(
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 2345, in autotune_select_algorithm
      return _ALGORITHM_SELECTOR_CACHE(*args, **kwargs)
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 1985, in __call__
      timings = do_autotuning(precompile_fn)
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 1913, in do_autotuning
      timings = self.lookup(
    File "pytorchs/pytorch/torch/_inductor/codecache.py", line 321, in lookup
      timings = benchmark(choices)
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 1893, in autotune
      return make_benchmark_fn()(choices)
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 2119, in benchmark_in_current_process
      raise e from None
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 2083, in benchmark_in_current_process
      timing = benchmark_choice_in_current_process(choice, inputs)
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 2063, in benchmark_choice_in_current_process
      result = choice.benchmark(*inpts, out=output)
    File "pytorchs/pytorch/torch/_inductor/select_algorithm.py", line 1535, in benchmark
      new_args, new_out = self._preprocessor(args, out)
    File "pytorchs/pytorch/torch/_inductor/codegen/cpp_gemm_template.py", line 937, in preprocessor
      *maybe_to_dense(*reorder_and_filter(inputs, layout))
    File "pytorchs/pytorch/torch/_inductor/codegen/cpp_gemm_template.py", line 846, in reorder_and_filter
      inputs[inp_idx],
  torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
  IndexError: tuple index out of range
  ```
  
  
  
  ### Versions
  
  latest Pytorch.