Error using torch.compile with HF transformers and model `mosaicml/mpt-7b`
Labels: triaged, oncall: pt2, module: dynamic shapes

### 🐛 Describe the bug

Below is a reproducible example of what is failing. It seems to relate to `rearrange` function from `einops` package. 

Tagging @ezyang (at the suggestion of @ani300)

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
import torch._dynamo
from torch._inductor.compile_fx import compile_fx

model_path = "mosaicml/mpt-7b"

model = AutoModelForCausalLM.from_pretrained(
    model_path, trust_remote_code=True
).eval()

tokenizer = AutoTokenizer.from_pretrained(
    model_path, trust_remote_code=True
)

compiled_forward = torch._dynamo.optimize(
    lambda model, inputs: compile_fx(
        model,
        inputs,
        config_patches={
            "triton.cudagraphs": False,
            "size_asserts": False,
        },
    ),
    dynamic=True,
)(model.forward)

with torch.no_grad():

    tokenized_inputs = tokenizer(
        "Testing PT2 Compile",
        return_tensors="pt",
    )

    print(tokenized_inputs)

    output = model.forward(
        input_ids=tokenized_inputs['input_ids'],
        attention_mask=tokenized_inputs['attention_mask']
    )

    print(output)

    output = compiled_forward(
        input_ids=tokenized_inputs['input_ids'],
        attention_mask=tokenized_inputs['attention_mask']
    )

    print(output)
```

### Error logs

```bash
$ python issue.py 
Instantiating an MPTForCausalLM model from /localhome/tpa/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b/72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7/modeling_mpt.py
You are using config.init_device='cpu', but you can also use config.init_device="meta" with Composer + FSDP for fast initialization.
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:07<00:00,  3.96s/it]
{'input_ids': tensor([[38571, 10622,    19,  3631,   587]]), 'attention_mask': tensor([[1, 1, 1, 1, 1]])}
CausalLMOutputWithPast(loss=None, logits=tensor([[[30.7642, 10.5882, 32.5046,  ..., 10.4191, 10.4177, 10.4317],
         [23.1704,  4.3510, 23.5814,  ...,  4.3556,  4.3414,  4.3513],
         [37.4781, 14.9682, 38.8808,  ..., 14.9036, 14.8895, 14.9042],
         [14.8190, -6.1388, 14.6889,  ..., -6.2073, -6.2138, -6.2110],
         [36.7066, 15.7330, 39.1332,  ..., 15.6551, 15.6470, 15.6626]]]), past_key_values=None, hidden_states=None, attentions=None)
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Traceback (most recent call last):
  File "/localhome/tpa/torch/issue.py", line 44, in <module>
    output = compiled_forward(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 306, in _fn
    return fn(*args, **kwargs)
  File "/localhome/tpa/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b/72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7/modeling_mpt.py", line 270, in forward
    outputs = self.transformer(input_ids=input_ids, past_key_values=past_key_values, attention_mask=attention_mask, prefix_mask=prefix_mask, sequence_id=sequence_id, return_dict=return_dict, output_attentions=output_attentions, output_hidden_states=output_hidden_states, use_cache=use_cache)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1522, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1531, in _call_impl
    return forward_call(*args, **kwargs)
  File "/localhome/tpa/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b/72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7/modeling_mpt.py", line 143, in forward
    def forward(self, input_ids: torch.LongTensor, past_key_values: Optional[List[Tuple[torch.FloatTensor]]]=None, attention_mask: Optional[torch.ByteTensor]=None, prefix_mask: Optional[torch.ByteTensor]=None, sequence_id: Optional[torch.LongTensor]=None, return_dict: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, use_cache: Optional[bool]=None, inputs_embeds: Optional[torch.Tensor]=None):
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 466, in catch_errors
    return callback(frame, cache_size, hooks, frame_state)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 546, in _convert_frame
    result = inner_convert(frame, cache_size, hooks, frame_state)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 129, in _fn
    return fn(*args, **kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 365, in _convert_frame_assert
    return _compile(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 191, in time_wrapper
    r = func(*args, **kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 435, in _compile
    out_code = transform_code_object(code, transform)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1002, in transform_code_object
    transformations(instructions, code_options)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 420, in transform
    tracer.run()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2060, in run
    super().run()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 719, in run
    and self.step()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 679, in step
    getattr(self, inst.opname)(inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 387, in wrapper
    return inner_fn(self, inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1163, in CALL_FUNCTION_KW
    self.call_function(fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 556, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/nn_module.py", line 333, in call_function
    return tx.inline_user_function_return(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 592, in inline_user_function_return
    result = InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2165, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2262, in inline_call_
    tracer.run()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 719, in run
    and self.step()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 679, in step
    getattr(self, inst.opname)(inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 387, in wrapper
    return inner_fn(self, inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1151, in CALL_FUNCTION_EX
    self.call_function(fn, argsvars.items, kwargsvars.items)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 556, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 339, in call_function
    return super().call_function(tx, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 293, in call_function
    return super().call_function(tx, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 124, in call_function
    return tx.inline_user_function_return(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 592, in inline_user_function_return
    result = InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2165, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2262, in inline_call_
    tracer.run()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 719, in run
    and self.step()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 679, in step
    getattr(self, inst.opname)(inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 387, in wrapper
    return inner_fn(self, inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1163, in CALL_FUNCTION_KW
    self.call_function(fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 556, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/nn_module.py", line 333, in call_function
    return tx.inline_user_function_return(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 592, in inline_user_function_return
    result = InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2165, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2262, in inline_call_
    tracer.run()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 719, in run
    and self.step()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 679, in step
    getattr(self, inst.opname)(inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 387, in wrapper
    return inner_fn(self, inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1151, in CALL_FUNCTION_EX
    self.call_function(fn, argsvars.items, kwargsvars.items)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 556, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 339, in call_function
    return super().call_function(tx, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 293, in call_function
    return super().call_function(tx, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 124, in call_function
    return tx.inline_user_function_return(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 592, in inline_user_function_return
    result = InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2165, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2262, in inline_call_
    tracer.run()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 719, in run
    and self.step()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 679, in step
    getattr(self, inst.opname)(inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 387, in wrapper
    return inner_fn(self, inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1163, in CALL_FUNCTION_KW
    self.call_function(fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 556, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 293, in call_function
    return super().call_function(tx, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 124, in call_function
    return tx.inline_user_function_return(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 592, in inline_user_function_return
    result = InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2165, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2262, in inline_call_
    tracer.run()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 719, in run
    and self.step()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 679, in step
    getattr(self, inst.opname)(inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 387, in wrapper
    return inner_fn(self, inst)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1163, in CALL_FUNCTION_KW
    self.call_function(fn, args, kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 556, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/torch.py", line 673, in call_function
    tensor_variable = wrap_fx_proxy(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 1136, in wrap_fx_proxy
    return wrap_fx_proxy_cls(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 1210, in wrap_fx_proxy_cls
    example_value = get_fake_value(proxy.node, tx)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1357, in get_fake_value
    raise TorchRuntimeError(str(e)).with_traceback(e.__traceback__) from None
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1325, in get_fake_value
    return wrap_fake_exception(
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 904, in wrap_fake_exception
    return fn()
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1326, in <lambda>
    lambda: run_node(tx.output, node, args, kwargs, nnmodule)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1391, in run_node
    raise RuntimeError(fn_str + str(e)).with_traceback(e.__traceback__) from e
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1378, in run_node
    return node.target(*args, **kwargs)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/einops/einops.py", line 483, in rearrange
    return reduce(cast(Tensor, tensor), pattern, reduction='rearrange', **axes_lengths)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/einops/einops.py", line 412, in reduce
    return _apply_recipe(recipe, tensor, reduction_type=reduction)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/einops/einops.py", line 235, in _apply_recipe
    _reconstruct_from_shape(recipe, backend.shape(tensor))
torch._dynamo.exc.TorchRuntimeError: Failed running call_function <function rearrange at 0x7fdcfa58e560>(*(FakeTensor(..., size=(1, s0, 4096)), 'b s (h d) -> b h s d'), **{'h': 32}):
unhashable type: 'SymInt'

from user code:
   File "/localhome/tpa/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b/72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7/attention.py", line 201, in forward
    (context, attn_weights, past_key_value) = self.attn_fn(query, key, value, self.n_heads, past_key_value=past_key_value, softmax_scale=self.softmax_scale, attn_bias=attn_bias, key_padding_mask=key_padding_mask, is_causal=is_causal, dropout_p=self.attn_dropout_p, training=self.training, needs_weights=needs_weights)
  File "/localhome/tpa/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b/72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7/attention.py", line 21, in scaled_multihead_dot_product_attention
    q = rearrange(query, 'b s (h d) -> b h s d', h=n_heads)

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


```

### Minified repro

```
$ python /localhome/tpa/torch/torch_compile_debug/run_2023_07_20_20_08_37_462675-pid_1406827/minifier/minifier_launcher.py
Loading inputs: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1333.64it/s]
Traceback (most recent call last):
  File "/localhome/tpa/torch/torch_compile_debug/run_2023_07_20_20_08_37_462675-pid_1406827/minifier/minifier_launcher.py", line 48, in <module>
    run_repro(mod, load_args, accuracy=False, command='minify',
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/repro/after_dynamo.py", line 566, in run_repro
    COMMAND_FNS[options.command](options, mod, load_args)
  File "/localhome/tpa/anaconda3/envs/pt-env/lib/python3.10/site-packages/torch/_dynamo/repro/after_dynamo.py", line 399, in repro_minify
    raise RuntimeError(
RuntimeError: Compiler name is None - this likely means that a custom compiler was called by torchdynamo. Please remove this error, import your custom compiler function, and replace the backend=None line in run_repro to backend=<my_imported_custom_function>
```

### Versions

```bash
Collecting environment information...
PyTorch version: 2.1.0.dev20230720+cpu
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.10.12 (main, Jul  5 2023, 18:54:27) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-4.15.0-209-generic-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: 11.7.99
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: 
GPU 0: Tesla V100-PCIE-16GB
GPU 1: Tesla V100-PCIE-16GB
GPU 2: Tesla V100-PCIE-16GB
GPU 3: Tesla V100-PCIE-16GB

Nvidia driver version: 515.65.01
cuDNN version: Could not collect
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
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          80
On-line CPU(s) list:             0-79
Thread(s) per core:              2
Core(s) per socket:              20
Socket(s):                       2
NUMA node(s):                    2
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           85
Model name:                      Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
Stepping:                        7
Frequency boost:                 enabled
CPU MHz:                         800.003
CPU max MHz:                     2101.0000
CPU min MHz:                     800.0000
BogoMIPS:                        4200.00
Virtualization:                  VT-x
L1d cache:                       1.3 MiB
L1i cache:                       1.3 MiB
L2 cache:                        40 MiB
L3 cache:                        55 MiB
NUMA node0 CPU(s):               0-19,40-59
NUMA node1 CPU(s):               20-39,60-79
Vulnerability Itlb multihit:     KVM: Mitigation: Split huge pages
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed:          Mitigation; Enhanced IBRS
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; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Mitigation; TSX disabled
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.25.1
[pip3] torch==2.1.0.dev20230720+cpu
[conda] numpy                     1.25.1                   pypi_0    pypi
[conda] torch                     2.1.0.dev20230720+cpu          pypi_0    pypi
```
Conda env:
```
conda create -n pt-env python=3.10
conda activate pt-env 
pip install --index-url "https://download.pytorch.org/whl/nightly/cpu" torch
pip install transformers einops
```
pip freeze:
```
$ pip freeze
certifi==2023.5.7
charset-normalizer==3.2.0
einops==0.6.1
filelock==3.9.0
fsspec==2023.4.0
huggingface-hub==0.16.4
idna==3.4
Jinja2==3.1.2
MarkupSafe==2.1.2
mpmath==1.2.1
networkx==2.6.3
numpy==1.25.1
packaging==23.1
PyYAML==6.0.1
regex==2023.6.3
requests==2.31.0
safetensors==0.3.1
sympy==1.11.1
tokenizers==0.13.3
torch==2.1.0.dev20230720+cpu
tqdm==4.65.0
transformers==4.31.0
typing_extensions==4.4.0
urllib3==2.0.4
```

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305