Repository: pytorch
Issue: Guard failing with `.item()` indexing
Labels: triaged,module: dynamic shapes

### 🐛 Describe the bug

```python
import torch

torch._dynamo.config.capture_scalar_outputs = True

def my_arithmetic(a, b):
    wrk = torch.zeros(a.size(0))
    for i in range(a.size(0)):
        idx = b[i].item()
        torch._check_is_size(idx)
        wrk[idx] += 1

    return wrk

model = torch.compile(my_arithmetic, fullgraph=True, disable=False)
my_a = torch.randn([9])
my_b = torch.ones(9, dtype=torch.int32)
model(my_a, my_b)
```


```bash
E0726 12:48:36.644000 140715036880896 torch/fx/experimental/recording.py:281] [0/0] failed while running evaluate_expr(*(u0 >= 9, None), **{'fx_node': None})
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] failed while attempting to run meta for aten.select.int
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] Traceback (most recent call last):
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1757, in _dispatch_impl
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     r = func(*args, **kwargs)
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_ops.py", line 667, in __call__
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     return self_._op(*args, **kwargs)
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4788, in meta_select
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     not (-index > size or index >= size),
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/__init__.py", line 563, in __bool__
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     return self.node.bool_()
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py", line 476, in bool_
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     return self.guard_bool("", 0)
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py", line 414, in guard_bool
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     r = self.shape_env.evaluate_expr(self.expr, self.hint, fx_node=self.fx_node)
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/recording.py", line 245, in wrapper
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     return fn(*args, **kwargs)
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/symbolic_shapes.py", line 5205, in evaluate_expr
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     raise self._make_data_dependent_error(
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] torch.fx.experimental.symbolic_shapes.GuardOnDataDependentSymNode: Could not guard on data-dependent expression u0 >= 9 (unhinted: u0 >= 9).  (Size-like symbols: u0)
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] 
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] Potential framework code culprit (scroll up for full backtrace):
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4788, in meta_select
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     not (-index > size or index >= size),
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] 
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] For more information, run with TORCH_LOGS="dynamic"
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] For extended logs when we create symbols, also add TORCHDYNAMO_EXTENDED_DEBUG_CREATE_SYMBOL="u0"
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] If you suspect the guard was triggered from C++, add TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] For more debugging help, see https://docs.google.com/document/d/1HSuTTVvYH1pTew89Rtpeu84Ht3nQEFTYhAX3Ypa_xJs/edit?usp=sharing
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] 
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] User Stack (most recent call last):
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   (snipped, see stack below for prefix)
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/debug/scatter_debug.py", line 10, in my_arithmetic
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0]     wrk[idx] += 1
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] 
E0726 12:48:36.645000 140715036880896 torch/_subclasses/fake_tensor.py:1761] [0/0] For C++ stack trace, run with TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
Traceback (most recent call last):
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1903, in run_node
    return node.target(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/utils/_stats.py", line 21, in wrapper
    return fn(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1061, in __torch_dispatch__
    return self.dispatch(func, types, args, kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1450, in dispatch
    return self._cached_dispatch_impl(func, types, args, kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1153, in _cached_dispatch_impl
    output = self._dispatch_impl(func, types, args, kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1757, in _dispatch_impl
    r = func(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_ops.py", line 667, in __call__
    return self_._op(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4788, in meta_select
    not (-index > size or index >= size),
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/__init__.py", line 563, in __bool__
    return self.node.bool_()
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py", line 476, in bool_
    return self.guard_bool("", 0)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py", line 414, in guard_bool
    r = self.shape_env.evaluate_expr(self.expr, self.hint, fx_node=self.fx_node)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/recording.py", line 245, in wrapper
    return fn(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/symbolic_shapes.py", line 5205, in evaluate_expr
    raise self._make_data_dependent_error(
torch.fx.experimental.symbolic_shapes.GuardOnDataDependentSymNode: Could not guard on data-dependent expression u0 >= 9 (unhinted: u0 >= 9).  (Size-like symbols: u0)

Potential framework code culprit (scroll up for full backtrace):
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4788, in meta_select
    not (-index > size or index >= size),

For more information, run with TORCH_LOGS="dynamic"
For extended logs when we create symbols, also add TORCHDYNAMO_EXTENDED_DEBUG_CREATE_SYMBOL="u0"
If you suspect the guard was triggered from C++, add TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
For more debugging help, see https://docs.google.com/document/d/1HSuTTVvYH1pTew89Rtpeu84Ht3nQEFTYhAX3Ypa_xJs/edit?usp=sharing

User Stack (most recent call last):
  (snipped, see stack below for prefix)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/debug/scatter_debug.py", line 10, in my_arithmetic
    wrk[idx] += 1

For C++ stack trace, run with TORCHDYNAMO_EXTENDED_DEBUG_CPP=1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1785, in get_fake_value
    ret_val = wrap_fake_exception(
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1300, in wrap_fake_exception
    return fn()
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1786, in <lambda>
    lambda: run_node(tx.output, node, args, kwargs, nnmodule)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1921, in run_node
    raise RuntimeError(make_error_message(e)).with_traceback(
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1903, in run_node
    return node.target(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/utils/_stats.py", line 21, in wrapper
    return fn(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1061, in __torch_dispatch__
    return self.dispatch(func, types, args, kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1450, in dispatch
    return self._cached_dispatch_impl(func, types, args, kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1153, in _cached_dispatch_impl
    output = self._dispatch_impl(func, types, args, kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1757, in _dispatch_impl
    r = func(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_ops.py", line 667, in __call__
    return self_._op(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4788, in meta_select
    not (-index > size or index >= size),
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/__init__.py", line 563, in __bool__
    return self.node.bool_()
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py", line 476, in bool_
    return self.guard_bool("", 0)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/sym_node.py", line 414, in guard_bool
    r = self.shape_env.evaluate_expr(self.expr, self.hint, fx_node=self.fx_node)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/recording.py", line 245, in wrapper
    return fn(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/fx/experimental/symbolic_shapes.py", line 5205, in evaluate_expr
    raise self._make_data_dependent_error(
RuntimeError: Failed running call_function <built-in method select of type object at 0x7ffac403a500>(*(FakeTensor(..., size=(9,)), 0, u0), **{}):
Could not guard on data-dependent expression u0 >= 9 (unhinted: u0 >= 9).  (Size-like symbols: u0)

Potential framework code culprit (scroll up for full backtrace):
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4788, in meta_select
    not (-index > size or index >= size),

For more information, run with TORCH_LOGS="dynamic"
For extended logs when we create symbols, also add TORCHDYNAMO_EXTENDED_DEBUG_CREATE_SYMBOL="u0"
If you suspect the guard was triggered from C++, add TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
For more debugging help, see https://docs.google.com/document/d/1HSuTTVvYH1pTew89Rtpeu84Ht3nQEFTYhAX3Ypa_xJs/edit?usp=sharing

User Stack (most recent call last):
  (snipped, see stack below for prefix)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/debug/scatter_debug.py", line 10, in my_arithmetic
    wrk[idx] += 1

For C++ stack trace, run with TORCHDYNAMO_EXTENDED_DEBUG_CPP=1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/debug/scatter_debug.py", line 17, in <module>
    model(my_a, my_b)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 433, in _fn
    return fn(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1116, in __call__
    return self._torchdynamo_orig_callable(
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 472, in __call__
    return _compile(
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_utils_internal.py", line 84, in wrapper_function
    return StrobelightCompileTimeProfiler.profile_compile_time(
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_strobelight/compile_time_profiler.py", line 129, in profile_compile_time
    return func(*args, **kwargs)
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 817, in _compile
    guarded_code = compile_inner(code, one_graph, hooks, transform)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 231, in time_wrapper
    r = func(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 636, in compile_inner
    out_code = transform_code_object(code, transform)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1185, in transform_code_object
    transformations(instructions, code_options)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 178, in _fn
    return fn(*args, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 582, in transform
    tracer.run()
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2451, in run
    super().run()
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 893, in run
    while self.step():
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 805, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 499, in wrapper
    return inner_fn(self, inst)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 234, in impl
    self.push(fn_var.call_function(self, self.popn(nargs), {}))
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/builtin.py", line 962, in call_function
    return handler(tx, args, kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/builtin.py", line 941, in _handle_insert_op_in_graph
    return wrap_fx_proxy(tx, proxy)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 1713, in wrap_fx_proxy
    return wrap_fx_proxy_cls(target_cls=TensorVariable, **kwargs)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 1798, in wrap_fx_proxy_cls
    example_value = get_fake_value(proxy.node, tx, allow_non_graph_fake=True)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1840, in get_fake_value
    raise UserError(  # noqa: B904
torch._dynamo.exc.UserError: Tried to use data-dependent value in the subsequent computation. This can happen when we encounter unbounded dynamic value that is unknown during tracing time.  You will need to explicitly give hint to the compiler. Please take a look at torch._check OR torch._check_is_size APIs.  Could not guard on data-dependent expression u0 >= 9 (unhinted: u0 >= 9).  (Size-like symbols: u0)

Potential framework code culprit (scroll up for full backtrace):
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/.venv/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4788, in meta_select
    not (-index > size or index >= size),

For more information, run with TORCH_LOGS="dynamic"
For extended logs when we create symbols, also add TORCHDYNAMO_EXTENDED_DEBUG_CREATE_SYMBOL="u0"
If you suspect the guard was triggered from C++, add TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
For more debugging help, see https://docs.google.com/document/d/1HSuTTVvYH1pTew89Rtpeu84Ht3nQEFTYhAX3Ypa_xJs/edit?usp=sharing

User Stack (most recent call last):
  (snipped, see stack below for prefix)
  File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/debug/scatter_debug.py", line 10, in my_arithmetic
    wrk[idx] += 1

For C++ stack trace, run with TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
For more information about this error, see: https://pytorch.org/docs/main/generated/exportdb/index.html#constrain-as-size-example

from user code:
   File "/home/mkotak/atomic_architects/projects/e3nn_simple_network/debug/scatter_debug.py", line 10, in my_arithmetic
    wrk[idx] += 1

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information


You can suppress this exception and fall back to eager by setting:
    import torch._dynamo
    torch._dynamo.config.suppress_errors = True
```

### Versions

```bash
Collecting environment information...
PyTorch version: 2.4.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35

Python version: 3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-113-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.5.40
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA RTX A5500
GPU 1: NVIDIA RTX A5500
GPU 2: NVIDIA RTX A5500
GPU 3: NVIDIA RTX A5500
GPU 4: NVIDIA RTX A5500
GPU 5: NVIDIA RTX A5500
GPU 6: NVIDIA RTX A5500
GPU 7: NVIDIA RTX A5500

Nvidia driver version: 550.90.07
cuDNN version: Probably one of the following:
/usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudnn.so.8.9.6
/usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.9.6
/usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.9.6
/usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.9.6
/usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.9.6
/usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.9.6
/usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.9.6
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      48 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             64
On-line CPU(s) list:                0-63
Vendor ID:                          AuthenticAMD
Model name:                         AMD EPYC 7313 16-Core Processor
CPU family:                         25
Model:                              1
Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          2
Stepping:                           1
Frequency boost:                    enabled
CPU max MHz:                        3729.4919
CPU min MHz:                        1500.0000
BogoMIPS:                           6000.59
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca
Virtualization:                     AMD-V
L1d cache:                          1 MiB (32 instances)
L1i cache:                          1 MiB (32 instances)
L2 cache:                           16 MiB (32 instances)
L3 cache:                           256 MiB (8 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-15,32-47
NUMA node1 CPU(s):                  16-31,48-63
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Mitigation; safe RET
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] numpy==2.0.1
[pip3] torch==2.4.0
[pip3] torch-runstats==0.2.0
[pip3] triton==3.0.0
[conda] Could not collect
```

cc @ezyang @penguinwu