[dynamo] CommandLine Error: Option 'amdgpu-assume-external-call-stack-size' registered more than once
Labels: triaged, oncall: pt2

### 🐛 Describe the bug

I want to try out the new PyTorch 2.0 and see whether it can speed up my code. 

I have upgraded PyTorch through the get start section and the code can run smoothly after the upgrade. However, after adding `torch.compile`, the code raises an error:

```
/home/xingyuan/miniconda3/envs/vpt-pt2.0/lib/python3.9/site-packages/torch/storage.py:315: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.
  warnings.warn(message, UserWarning)
/home/xingyuan/miniconda3/envs/vpt-pt2.0/lib/python3.9/site-packages/torch/storage.py:315: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.
  warnings.warn(message, UserWarning)
[2022-12-05 10:43:27,836] torch._inductor.graph: [WARNING] Creating implicit fallback for:
  target: aten._thnn_fused_gru_cell.default
  args[0]: TensorBox(StorageBox(
    MatrixMultiply(
      name=buf3,
      layout=FlexibleLayout('cuda', torch.float32, size=[50, 1536], stride=[1536, 1]),
      inputs=[ConcatKernel(name='buf2', layout=FixedLayout('cuda', torch.float32, size=[50, 134], stride=[134, 1]), inputs=[ComputedBuffer(name='buf0', layout=AliasedLayout('cuda', torch.float32, size=[50, 128], stride=[134, 1]), data=Pointwise(
        'cuda',
        torch.float32,
        load(primals_30, i1 + 128 * i0),
        ranges=[50, 128],
        origins={cat}
      )), ComputedBuffer(name='buf1', layout=AliasedLayout('cuda', torch.float32, size=[50, 6], stride=[134, 1]), data=Pointwise(
        'cuda',
        torch.float32,
        load(primals_31, i1 + 6 * i0),
        ranges=[50, 6],
        origins={cat}
      ))]), ReinterpretView(
        StorageBox(
          InputBuffer(name='primals_1', layout=FixedLayout('cuda', torch.float32, size=[1536, 134], stride=[134, 1]))
        ),
        FixedLayout('cuda', torch.float32, size=[134, 1536], stride=[1, 134]),
        no origins?
      )],
      constant_args=(),
      kwargs={},
      output_view=None,
      origins={primals_1, permute, mm, cat}
    )
  ))
  args[1]: TensorBox(StorageBox(
    MatrixMultiply(
      name=buf4,
      layout=FlexibleLayout('cuda', torch.float32, size=[50, 1536], stride=[1536, 1]),
      inputs=[InputBuffer(name='primals_29', layout=FixedLayout('cuda', torch.float32, size=[50, 512], stride=[512, 1])), ReinterpretView(
        StorageBox(
          InputBuffer(name='primals_2', layout=FixedLayout('cuda', torch.float32, size=[1536, 512], stride=[512, 1]))
        ),
        FixedLayout('cuda', torch.float32, size=[512, 1536], stride=[1, 512]),
        no origins?
      )],
      constant_args=(),
      kwargs={},
      output_view=None,
      origins={primals_29, primals_2, permute_1, mm_1}
    )
  ))
  args[2]: TensorBox(StorageBox(
    InputBuffer(name='primals_29', layout=FixedLayout('cuda', torch.float32, size=[50, 512], stride=[512, 1]))
  ))
  args[3]: TensorBox(StorageBox(
    InputBuffer(name='primals_3', layout=FixedLayout('cuda', torch.float32, size=[1536], stride=[1]))
  ))
  args[4]: TensorBox(StorageBox(
    InputBuffer(name='primals_4', layout=FixedLayout('cuda', torch.float32, size=[1536], stride=[1]))
  ))
[2022-12-05 10:43:27,850] torch._inductor.ir: [WARNING] Using FallbackKernel: torch.ops.aten._thnn_fused_gru_cell.default
[2022-12-05 10:43:27,878] torch._inductor.graph: [WARNING] Creating implicit fallback for:
  target: aten.normal_functional.default
  args[0]: TensorBox(StorageBox(
    Pointwise(
      'cuda',
      torch.float32,
      constant(0, torch.float32),
      ranges=[50, 128],
      origins={empty}
    )
  ))
[2022-12-05 10:43:27,882] torch._inductor.ir: [WARNING] Using FallbackKernel: torch.ops.aten.normal_functional.default
: CommandLine Error: Option 'amdgpu-assume-external-call-stack-size' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (core dumped)
```

I tried the debugging options [here](https://pytorch.org/docs/master/dynamo/faq.html#why-is-my-code-crashing), i.e. `dynamo.optimize("eager")` and `torch._dynamo.config.verbose=True`. But the error is still the same and no further details log is shown. 

### Versions

Collecting environment information...
PyTorch version: 1.14.0.dev20221204+cu117
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.3 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.25.0
Libc version: glibc-2.31

Python version: 3.9.15 (main, Nov 24 2022, 14:31:59)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.10.0-1057-oem-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 11.7.99
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1080 Ti
Nvidia driver version: 520.56.06
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.1
[pip3] torch==1.14.0.dev20221204+cu117
[pip3] torchtriton==2.0.0+0d7e753227
[conda] cudatoolkit               11.7.0              hd8887f6_10    nvidia
[conda] numpy                     1.23.1                   pypi_0    pypi
[conda] pytorch-cuda              11.7                 h67b0de4_0    pytorch
[conda] torch                     1.14.0.dev20221204+cu117          pypi_0    pypi
[conda] torchtriton               2.0.0+0d7e753227          pypi_0    pypi

cc @ezyang @gchanan @zou3519 @soumith @msaroufim @wconstab @ngimel @bdhirsh