`log_softmax` + `pad` triggers assertion fail in compile mode
Labels: triaged, oncall: pt2, module: inductor, ciflow/inductor

### 🐛 Describe the bug

The following program works fine in eager mode but raises assertion fail in compile mode. It's worth noting that `torch.float64` tensor is necessary for triggering this issue.
```python
import torch

def fn(v1_0):
    v4_0 = torch.nn.functional.log_softmax(v1_0, 2, _stacklevel=17, dtype=None)
    v2_0 = torch.nn.functional.pad(v4_0, [0, 0, 1, 0], mode='constant', value=None)
    return [v2_0]

x = torch.rand([1, 2, 1, 5], dtype=torch.float64)

ret_eager = fn(x)
print('==== Eager mode OK! ====')

compiled = torch.compile(fn)
print('==== torchcomp compilation OK! ====')

ret_compiled = compiled(x)
print('==== torchcomp mode OK! ====')
```

### Error logs

<details><summary>Original error logs</summary>

```
==== Eager mode OK! ====
==== torchcomp compilation OK! ====
python3.8/site-packages/torch/_inductor/compile_fx.py:90: UserWarning: TensorFloat32 tensor cores for float32 matrix multiplication available but not enabled. Consider setting `torch.set_float32_matmul_precision('high')` for better performance.
  warnings.warn(
Traceback (most recent call last):
  File "python3.8/site-packages/torch/_dynamo/output_graph.py", line 692, in call_user_compiler
    compiled_fn = compiler_fn(gm, self.fake_example_inputs())
  File "python3.8/site-packages/torch/_dynamo/debug_utils.py", line 1047, in debug_wrapper
    compiled_gm = compiler_fn(gm, example_inputs, **kwargs)
  File "python3.8/site-packages/torch/__init__.py", line 1324, in __call__
    return self.compile_fn(model_, inputs_)
  File "python3.8/site-packages/torch/_dynamo/optimizations/backends.py", line 24, in inner
    return fn(gm, example_inputs, **kwargs)
  File "python3.8/site-packages/torch/_dynamo/optimizations/backends.py", line 61, in inductor
    return compile_fx(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/compile_fx.py", line 413, in compile_fx
    return aot_autograd(
  File "python3.8/site-packages/torch/_dynamo/optimizations/training.py", line 74, in compiler_fn
    cg = aot_module_simplified(gm, example_inputs, **kwargs)
  File "python3.8/site-packages/torch/_functorch/aot_autograd.py", line 2483, in aot_module_simplified
    compiled_fn = create_aot_dispatcher_function(
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_functorch/aot_autograd.py", line 2180, in create_aot_dispatcher_function
    compiled_fn = compiler_fn(flat_fn, fake_flat_args, aot_config)
  File "python3.8/site-packages/torch/_functorch/aot_autograd.py", line 1411, in aot_wrapper_dedupe
    return compiler_fn(flat_fn, leaf_flat_args, aot_config)
  File "python3.8/site-packages/torch/_functorch/aot_autograd.py", line 1061, in aot_dispatch_base
    compiled_fw = aot_config.fw_compiler(fw_module, flat_args)
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/compile_fx.py", line 388, in fw_compiler
    return inner_compile(
  File "python3.8/site-packages/torch/_dynamo/debug_utils.py", line 586, in debug_wrapper
    compiled_fn = compiler_fn(gm, example_inputs, **kwargs)
  File "python3.8/site-packages/torch/_inductor/debug.py", line 239, in inner
    return fn(*args, **kwargs)
  File "/opt/miniconda3/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "python3.8/site-packages/torch/_inductor/compile_fx.py", line 151, in compile_fx_inner
    compiled_fn = graph.compile_to_fn()
  File "python3.8/site-packages/torch/_inductor/graph.py", line 567, in compile_to_fn
    return self.compile_to_module().call
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/graph.py", line 552, in compile_to_module
    code = self.codegen()
  File "python3.8/site-packages/torch/_inductor/graph.py", line 501, in codegen
    self.scheduler = Scheduler(self.buffers)
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/scheduler.py", line 567, in __init__
    self.nodes.append(SchedulerNode(self, node, group_fn))
  File "python3.8/site-packages/torch/_inductor/scheduler.py", line 234, in __init__
    super().__init__(scheduler, node)
  File "python3.8/site-packages/torch/_inductor/scheduler.py", line 58, in __init__
    self.set_read_writes(node.get_read_writes())
  File "python3.8/site-packages/torch/_inductor/utils.py", line 206, in wrapper
    setattr(self, key, fn(self))
  File "python3.8/site-packages/torch/_inductor/ir.py", line 2034, in get_read_writes
    return extract_read_writes(
  File "python3.8/site-packages/torch/_inductor/dependencies.py", line 273, in extract_read_writes
    fn(*args)
  File "python3.8/site-packages/torch/_inductor/ir.py", line 373, in store_output
    return ops.store(output_name, indexer(vars), self.inner_fn(vars))
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 2461, in offset_fn
    return mask(new_index)
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 2454, in mask
    return ops.masked(mask, lambda: x_loader(index), fill_value)
  File "python3.8/site-packages/torch/_inductor/virtualized.py", line 104, in inner
    line = getattr(self.parent_handler, name)(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/virtualized.py", line 75, in masked
    return f"masked({mask}, {body()}, {other})"
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 2454, in <lambda>
    return ops.masked(mask, lambda: x_loader(index), fill_value)
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in inner_fn
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in <listcomp>
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in inner_fn
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in <listcomp>
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/ir.py", line 791, in fn
    return inner_fn(index, reduction_index)
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 3241, in loader
    assert all(index[i] == 0 for i in reduced_idx)
AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "repro.py", line 16, in <module>
    ret_compiled = compiled(x)
  File "python3.8/site-packages/torch/_dynamo/eval_frame.py", line 211, in _fn
    return fn(*args, **kwargs)
  File "python3.8/site-packages/torch/_dynamo/eval_frame.py", line 332, in catch_errors
    return callback(frame, cache_size, hooks)
  File "python3.8/site-packages/torch/_dynamo/convert_frame.py", line 403, in _convert_frame
    result = inner_convert(frame, cache_size, hooks)
  File "python3.8/site-packages/torch/_dynamo/convert_frame.py", line 103, in _fn
    return fn(*args, **kwargs)
  File "python3.8/site-packages/torch/_dynamo/convert_frame.py", line 261, in _convert_frame_assert
    return _compile(
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_dynamo/convert_frame.py", line 323, in _compile
    out_code = transform_code_object(code, transform)
  File "python3.8/site-packages/torch/_dynamo/bytecode_transformation.py", line 339, in transform_code_object
    transformations(instructions, code_options)
  File "python3.8/site-packages/torch/_dynamo/convert_frame.py", line 310, in transform
    tracer.run()
  File "python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 1715, in run
    super().run()
  File "python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 564, in run
    and self.step()
  File "python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 527, in step
    getattr(self, inst.opname)(inst)
  File "python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 1781, in RETURN_VALUE
    self.output.compile_subgraph(self)
  File "python3.8/site-packages/torch/_dynamo/output_graph.py", line 563, in compile_subgraph
    self.compile_and_call_fx_graph(tx, pass2.graph_output_vars(), root)
  File "python3.8/site-packages/torch/_dynamo/output_graph.py", line 610, in compile_and_call_fx_graph
    compiled_fn = self.call_user_compiler(gm)
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_dynamo/output_graph.py", line 697, in call_user_compiler
    raise BackendCompilerFailed(self.compiler_fn, e) from e
torch._dynamo.exc.BackendCompilerFailed: debug_wrapper raised AssertionError: 

Set torch._dynamo.config.verbose=True for more information


You can suppress this exception and fall back to eager by setting:
    torch._dynamo.config.suppress_errors = True
```

</details>

<details><summary>Minified repro error logs</summary>

```
python3.8/site-packages/torch/_inductor/compile_fx.py:90: UserWarning: TensorFloat32 tensor cores for float32 matrix multiplication available but not enabled. Consider setting `torch.set_float32_matmul_precision('high')` for better performance.
  warnings.warn(
Traceback (most recent call last):
  File "repro.py", line 51, in <module>
    compiled = compile_fx_inner(mod, args)
  File "python3.8/site-packages/torch/_dynamo/debug_utils.py", line 586, in debug_wrapper
    compiled_fn = compiler_fn(gm, example_inputs, **kwargs)
  File "python3.8/site-packages/torch/_inductor/debug.py", line 239, in inner
    return fn(*args, **kwargs)
  File "/opt/miniconda3/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "python3.8/site-packages/torch/_inductor/compile_fx.py", line 151, in compile_fx_inner
    compiled_fn = graph.compile_to_fn()
  File "python3.8/site-packages/torch/_inductor/graph.py", line 567, in compile_to_fn
    return self.compile_to_module().call
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/graph.py", line 552, in compile_to_module
    code = self.codegen()
  File "python3.8/site-packages/torch/_inductor/graph.py", line 501, in codegen
    self.scheduler = Scheduler(self.buffers)
  File "python3.8/site-packages/torch/_dynamo/utils.py", line 161, in time_wrapper
    r = func(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/scheduler.py", line 567, in __init__
    self.nodes.append(SchedulerNode(self, node, group_fn))
  File "python3.8/site-packages/torch/_inductor/scheduler.py", line 234, in __init__
    super().__init__(scheduler, node)
  File "python3.8/site-packages/torch/_inductor/scheduler.py", line 58, in __init__
    self.set_read_writes(node.get_read_writes())
  File "python3.8/site-packages/torch/_inductor/utils.py", line 206, in wrapper
    setattr(self, key, fn(self))
  File "python3.8/site-packages/torch/_inductor/ir.py", line 2034, in get_read_writes
    return extract_read_writes(
  File "python3.8/site-packages/torch/_inductor/dependencies.py", line 273, in extract_read_writes
    fn(*args)
  File "python3.8/site-packages/torch/_inductor/ir.py", line 373, in store_output
    return ops.store(output_name, indexer(vars), self.inner_fn(vars))
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 2461, in offset_fn
    return mask(new_index)
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 2454, in mask
    return ops.masked(mask, lambda: x_loader(index), fill_value)
  File "python3.8/site-packages/torch/_inductor/virtualized.py", line 104, in inner
    line = getattr(self.parent_handler, name)(*args, **kwargs)
  File "python3.8/site-packages/torch/_inductor/virtualized.py", line 75, in masked
    return f"masked({mask}, {body()}, {other})"
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 2454, in <lambda>
    return ops.masked(mask, lambda: x_loader(index), fill_value)
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in inner_fn
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in <listcomp>
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in inner_fn
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 344, in <listcomp>
    return fn(*[load(index) for load in loaders])
  File "python3.8/site-packages/torch/_inductor/ir.py", line 791, in fn
    return inner_fn(index, reduction_index)
  File "python3.8/site-packages/torch/_inductor/lowering.py", line 3241, in loader
    assert all(index[i] == 0 for i in reduced_idx)
AssertionError
```

</details>

### Minified repro

```python
import torch._inductor.overrides

import torch
from torch import tensor, device
import torch.fx as fx
from torch._dynamo.testing import rand_strided
from math import inf
from torch.fx.experimental.proxy_tensor import make_fx

import torch._dynamo.config
import torch._inductor.config
torch._dynamo.config.load_config(b'\x80\x04\x95\xad\x07\x00\x00\x00\x00\x00\x00}\x94(\x8c\x08__name__\x94\x8c\x14torch._dynamo.config\x94\x8c\x07__doc__\x94N\x8c\x0b__package__\x94\x8c\rtorch._dynamo\x94\x8c\n__loader__\x94\x8c\x1a_frozen_importlib_external\x94\x8c\x10SourceFileLoader\x94\x93\x94)\x81\x94}\x94(\x8c\x04name\x94h\x02\x8c\x04path\x94\x8cF/home/yuyao/.local/lib/python3.8/site-packages/torch/_dynamo/config.py\x94ub\x8c\x08__spec__\x94\x8c\x11_frozen_importlib\x94\x8c\nModuleSpec\x94\x93\x94)\x81\x94}\x94(h\x0ch\x02\x8c\x06loader\x94h\n\x8c\x06origin\x94h\x0e\x8c\x0cloader_state\x94N\x8c\x1asubmodule_search_locations\x94N\x8c\r_set_fileattr\x94\x88\x8c\x07_cached\x94\x8c^/home/yuyao/.local/lib/python3.8/site-packages/torch/_dynamo/__pycache__/config.cpython-38.pyc\x94\x8c\r_initializing\x94\x89ub\x8c\x08__file__\x94h\x0e\x8c\n__cached__\x94h\x1b\x8c\x07abspath\x94\x8c\tposixpath\x94h\x1f\x93\x94\x8c\x07dirname\x94h h"\x93\x94\x8c\tlog_level\x94K\x1e\x8c\x0boutput_code\x94\x89\x8c\rlog_file_name\x94N\x8c\x07verbose\x94\x89\x8c\x11output_graph_code\x94\x89\x8c\x12verify_correctness\x94\x89\x8c\x12minimum_call_count\x94K\x01\x8c\x15dead_code_elimination\x94\x88\x8c\x10cache_size_limit\x94K@\x8c\x14specialize_int_float\x94\x88\x8c\x0edynamic_shapes\x94\x89\x8c\x10guard_nn_modules\x94\x89\x8c\x0cnormalize_ir\x94\x89\x8c\x1btraceable_tensor_subclasses\x94\x8f\x94\x8c\x0fsuppress_errors\x94\x89\x8c\x15replay_record_enabled\x94\x89\x8c rewrite_assert_with_torch_assert\x94\x88\x8c\x12print_graph_breaks\x94\x89\x8c\x07disable\x94\x89\x8c*allowed_functions_module_string_ignorelist\x94\x8f\x94(\x8c\x13torch.distributions\x94\x8c\x0ctorch._prims\x94\x8c\rtorch._decomp\x94\x8c\x0btorch._refs\x94\x8c\rtorch.testing\x94\x90\x8c\x16capture_scalar_outputs\x94\x89\x8c\x19enforce_cond_guards_match\x94\x88\x8c\x0coptimize_ddp\x94\x88\x8c\x1araise_on_ctx_manager_usage\x94\x88\x8c\x1craise_on_unsafe_aot_autograd\x94\x89\x8c\rdynamo_import\x94\x8c\rtorch._dynamo\x94\x8c\x0finductor_import\x94\x8c\x0ftorch._inductor\x94\x8c\x18error_on_nested_fx_trace\x94\x88\x8c\tallow_rnn\x94\x89\x8c\x08base_dir\x94\x8c./home/yuyao/.local/lib/python3.8/site-packages\x94\x8c\x0edebug_dir_root\x94\x8c)/home/yuyao/bug_repro/torch_compile_debug\x94\x8c)DO_NOT_USE_legacy_non_fake_example_inputs\x94\x89\x8c\x15_AccessLimitingConfig\x94}\x94(\x8c\n__module__\x94h\x02\x8c\x0b__setattr__\x94\x8c\x14torch._dynamo.config\x94\x8c!_AccessLimitingConfig.__setattr__\x94\x93\x94h\x03Nu\x8c\x15_allowed_config_names\x94\x8f\x94(h\x1dh7\x8c\nModuleType\x94hB\x8c\x02os\x94h5h@h\x04h/h*hOh$\x8c\x07logging\x94hDh3h1\x8c\x12constant_functions\x94h.\x8c\x0brepro_level\x94h0\x8c\x03sys\x94\x8c\x05torch\x94h\x1fh\x01hNhChIhHhAh(h%hJh\x03h\x0fh&h)h-\x8c!skipfiles_inline_module_allowlist\x94h8h\x1e\x8c\x0brepro_after\x94\x8c\x0c__builtins__\x94hLh4h,hF\x8c\x0eexternal_utils\x94h"h\x06h6h\'h+h?\x90\x8c\x1cget_config_serialization_fns\x94\x8c\x1atorch._dynamo.config_utils\x94hc\x93\x94u.')
torch._inductor.config.load_config(b'\x80\x04\x95\x07\t\x00\x00\x00\x00\x00\x00}\x94(\x8c\x08__name__\x94\x8c\x16torch._inductor.config\x94\x8c\x07__doc__\x94N\x8c\x0b__package__\x94\x8c\x0ftorch._inductor\x94\x8c\n__loader__\x94\x8c\x1a_frozen_importlib_external\x94\x8c\x10SourceFileLoader\x94\x93\x94)\x81\x94}\x94(\x8c\x04name\x94h\x02\x8c\x04path\x94\x8cH/home/yuyao/.local/lib/python3.8/site-packages/torch/_inductor/config.py\x94ub\x8c\x08__spec__\x94\x8c\x11_frozen_importlib\x94\x8c\nModuleSpec\x94\x93\x94)\x81\x94}\x94(h\x0ch\x02\x8c\x06loader\x94h\n\x8c\x06origin\x94h\x0e\x8c\x0cloader_state\x94N\x8c\x1asubmodule_search_locations\x94N\x8c\r_set_fileattr\x94\x88\x8c\x07_cached\x94\x8c`/home/yuyao/.local/lib/python3.8/site-packages/torch/_inductor/__pycache__/config.cpython-38.pyc\x94\x8c\r_initializing\x94\x89ub\x8c\x08__file__\x94h\x0e\x8c\n__cached__\x94h\x1b\x8c\x05debug\x94\x89\x8c\x10disable_progress\x94\x88\x8c\x10verbose_progress\x94\x89\x8c\x0bcpp_wrapper\x94\x89\x8c\x03dce\x94\x89\x8c\x14static_weight_shapes\x94\x88\x8c\x0csize_asserts\x94\x88\x8c\x10pick_loop_orders\x94\x88\x8c\x0finplace_buffers\x94\x88\x8c\x11benchmark_harness\x94\x88\x8c\x0fepilogue_fusion\x94\x89\x8c\x15epilogue_fusion_first\x94\x89\x8c\x0cmax_autotune\x94\x89\x8c\x17realize_reads_threshold\x94K\x04\x8c\x17realize_bytes_threshold\x94M\xd0\x07\x8c\x1brealize_acc_reads_threshold\x94K\x08\x8c\x0ffallback_random\x94\x89\x8c\x12implicit_fallbacks\x94\x88\x8c\rprefuse_nodes\x94\x88\x8c\x0btune_layout\x94\x89\x8c\x11aggressive_fusion\x94\x89\x8c\x0fmax_fusion_size\x94K@\x8c\x1bunroll_reductions_threshold\x94K\x08\x8c\x0ecomment_origin\x94\x89\x8c\tis_fbcode\x94\x8c\x16torch._inductor.config\x94h7\x93\x94\x8c\x0fcompile_threads\x94K \x8c\x13kernel_name_max_ops\x94K\n\x8c\x0finductor_import\x94\x8c\x0ftorch._inductor\x94\x8c\rshape_padding\x94\x89\x8c\x0epermute_fusion\x94\x89\x8c\x1aprofiler_mark_wrapper_call\x94\x89\x8c\x03cpp\x94}\x94(\x8c\n__module__\x94h\x02\x8c\x07threads\x94J\xff\xff\xff\xff\x8c\x0fdynamic_threads\x94\x89\x8c\x07simdlen\x94N\x8c\x0emin_chunk_size\x94M\x00\x10\x8c\x03cxx\x94N\x8c\x03g++\x94\x86\x94\x8c\x15enable_kernel_profile\x94\x89h\x03Nu\x8c\x06triton\x94}\x94(hCh\x02\x8c\ncudagraphs\x94\x88\x8c\x10debug_sync_graph\x94\x89\x8c\x11debug_sync_kernel\x94\x89\x8c\x0bconvolution\x94\x8c\x04aten\x94\x8c\x0edense_indexing\x94\x89\x8c\tmax_tiles\x94K\x02\x8c\x12autotune_pointwise\x94\x88\x8c tiling_prevents_pointwise_fusion\x94\x88\x8c tiling_prevents_reduction_fusion\x94\x88\x8c\x14ordered_kernel_names\x94\x89\x8c\x18descriptive_kernel_names\x94\x89h\x03Nu\x8c\x05trace\x94}\x94(hCh\x02\x8c\x07enabled\x94\x89\x8c\tdebug_log\x94\x88\x8c\x08info_log\x94\x89\x8c\x08fx_graph\x94\x88\x8c\rir_pre_fusion\x94\x88\x8c\x0eir_post_fusion\x94\x88\x8c\x0boutput_code\x94\x88\x8c\rgraph_diagram\x94\x89\x8c\x0fcompile_profile\x94\x89\x8c\nupload_tar\x94Nh\x03Nu\x8c\x15InductorConfigContext\x94}\x94(hCh\x02\x8c\x0f__annotations__\x94}\x94(\x8c\rstatic_memory\x94\x8c\x08builtins\x94\x8c\x04bool\x94\x93\x94\x8c\x0ematmul_padding\x94hm\x8c\x0cmax_autotune\x94hm\x8c\x12triton_convolution\x94hk\x8c\x03str\x94\x93\x94\x8c\x17rematerialize_threshold\x94hk\x8c\x03int\x94\x93\x94\x8c\x1brematerialize_acc_threshold\x94huu\x8c\x05_save\x94h8\x8c\x1bInductorConfigContext._save\x94\x93\x94\x8c\x06_apply\x94h8\x8c\x1cInductorConfigContext._apply\x94\x93\x94\x8c\x08__init__\x94h8\x8c\x1eInductorConfigContext.__init__\x94\x93\x94\x8c\t__enter__\x94h8\x8c\x1fInductorConfigContext.__enter__\x94\x93\x94\x8c\x08__exit__\x94h8\x8c\x1eInductorConfigContext.__exit__\x94\x93\x94h\x03Nu\x8c\x1cget_config_serialization_fns\x94\x8c\x1atorch._dynamo.config_utils\x94h\x86\x93\x94u.')


# REPLACEABLE COMMENT FOR TESTING PURPOSES


# torch version: 2.0.0.dev20230131+cu117
# torch cuda version: 11.7
# torch git version: b2690c3ceae36fa6681a0c7cedcc8db7f5d9814a


# CUDA Info: 
# nvcc not found
# GPU Hardware Info: 
# NVIDIA RTX A6000 : 4 


from torch.nn import *
class Repro(torch.nn.Module):
    def __init__(self):
        super().__init__()

    
    
    def forward(self, sub, exp):
        sum_1 = torch.ops.aten.sum.dim_IntList(exp, [2], True);  exp = None
        log = torch.ops.aten.log.default(sum_1);  sum_1 = None
        sub_1 = torch.ops.aten.sub.Tensor(sub, log);  sub = log = None
        constant_pad_nd = torch.ops.aten.constant_pad_nd.default(sub_1, [0, 0, 1, 0], 0.0);  sub_1 = None
        return (constant_pad_nd,)
        
args = [((1, 2, 1, 5), (10, 5, 5, 1), torch.float64, 'cpu'), ((1, 2, 1, 5), (10, 5, 5, 1), torch.float64, 'cpu')]
args = [rand_strided(sh, st, dt, dev) for (sh, st, dt, dev) in args]
mod = make_fx(Repro())(*args)

from torch._inductor.compile_fx import compile_fx_inner
from torch._dynamo.debug_utils import same_two_models

compiled = compile_fx_inner(mod, args)
ref = compiled(args)


```

### Versions

<details><summary><b>Environment</b> <i>[Click to expand]</i></summary>

```
PyTorch version: 2.0.0.dev20230131+cu117
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: 10.0.0-4ubuntu1 
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.8.13 (default, Mar 28 2022, 11:38:47)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.17
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA RTX A6000
GPU 1: NVIDIA RTX A6000
GPU 2: NVIDIA RTX A6000
GPU 3: NVIDIA RTX A6000

Nvidia driver version: 510.68.02
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.2
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.2
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.2
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.2
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.2
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.2
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.2
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.5
[pip3] pytorch-triton==2.0.0+0d7e753227
[pip3] torch==2.0.0.dev20230131+cu117
[pip3] torchaudio==2.0.0.dev20230126+cu117
[pip3] torchvision==0.15.0.dev20230126+cu117
[conda] No relevant packages
```

</details>

cc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh @mlazos @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire