undefined symbol: cuModuleGetFunction
Labels: triaged, has workaround, oncall: pt2, module: inductor

### 🐛 Describe the bug

When I run

```
./benchmarks/dynamo/torchbench.py --training --performance --no-skip --inductor --only moco
```

I get

```
  File "/data/users/ezyang/a/pytorch/torch/_inductor/triton_heuristics.py", line 205, in _precompile_config
    binary._init_handles()
  File "/home/ezyang/local/a/pytorch-env/lib/python3.10/site-packages/triton/compiler/compiler.py", line 555, in _init_handles
    driver.HIP: "hsaco_path",
  File "/home/ezyang/local/a/pytorch-env/lib/python3.10/site-packages/triton/runtime/driver.py", line 140, in __getattr__
    self._initialize_obj()
  File "/home/ezyang/local/a/pytorch-env/lib/python3.10/site-packages/triton/runtime/driver.py", line 137, in _initialize_obj
    self._obj = self._init_fn()
  File "/home/ezyang/local/a/pytorch-env/lib/python3.10/site-packages/triton/runtime/driver.py", line 169, in initialize_driver
    return CudaDriver()
  File "/home/ezyang/local/a/pytorch-env/lib/python3.10/site-packages/triton/runtime/driver.py", line 65, in __init__
    self.utils = CudaUtils()
  File "/home/ezyang/local/a/pytorch-env/lib/python3.10/site-packages/triton/runtime/driver.py", line 51, in __init__
    mod = importlib.util.module_from_spec(spec)
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1176, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
torch._dynamo.exc.BackendCompilerFailed: backend='compile_fn' raised:
ImportError: /tmp/torchinductor_ezyang/triton/0/faeb8676474438b8709860bca883a025/cuda_utils.so: undefined symbol: cuModuleGetFunction
```

weird.

Env:

```
PyTorch version: 2.1.0a0+git524e156
Is debug build: False
CUDA used to build PyTorch: 12.0
ROCM used to build PyTorch: N/A

OS: CentOS Stream 9 (x86_64)
GCC version: (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2)
Clang version: Could not collect
CMake version: version 3.27.2
Libc version: glibc-2.34

Python version: 3.10.12 (main, Jul  5 2023, 18:54:27) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.12.0-0_fbk15_zion_7536_ged335dd7211d-x86_64-with-glibc2.34
Is CUDA available: True
CUDA runtime version: 12.0.140
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA PG509-210
GPU 1: NVIDIA PG509-210
GPU 2: NVIDIA PG509-210
GPU 3: NVIDIA PG509-210
GPU 4: NVIDIA PG509-210
GPU 5: NVIDIA PG509-210
GPU 6: NVIDIA PG509-210
GPU 7: NVIDIA PG509-210

Nvidia driver version: 525.105.17
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
Address sizes:                   46 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          192
On-line CPU(s) list:             0-191
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Platinum 8339HC CPU @ 1.80GHz
CPU family:                      6
Model:                           85
Thread(s) per core:              2
Core(s) per socket:              24
Socket(s):                       4
Stepping:                        11
Frequency boost:                 enabled
CPU max MHz:                     1801.0000
CPU min MHz:                     800.0000
BogoMIPS:                        3600.00
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 ept_ad 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 avx512_bf16 dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       3 MiB (96 instances)
L1i cache:                       3 MiB (96 instances)
L2 cache:                        96 MiB (96 instances)
L3 cache:                        132 MiB (4 instances)
NUMA node(s):                    4
NUMA node0 CPU(s):               0-23,96-119
NUMA node1 CPU(s):               24-47,120-143
NUMA node2 CPU(s):               48-71,144-167
NUMA node3 CPU(s):               72-95,168-191
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
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
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] bert-pytorch==0.0.1a4
[pip3] clip-anytorch==2.5.2
[pip3] CoCa-pytorch==0.0.7
[pip3] dalle2-pytorch==1.14.2
[pip3] ema-pytorch==0.2.3
[pip3] flake8==6.0.0
[pip3] flake8-bugbear==23.3.23
[pip3] flake8-comprehensions==3.12.0
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-pyi==23.3.1
[pip3] flake8-simplify==0.19.3
[pip3] mypy==1.4.1
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.24.3
[pip3] open-clip-torch==2.20.0
[pip3] pytorch-transformers==1.2.0
[pip3] pytorch-triton==2.1.0+e6216047b8
[pip3] pytorch-warmup==0.1.1
[pip3] rotary-embedding-torch==0.2.6
[pip3] torch==2.2.0a0+git5648c9b
[pip3] torch-fidelity==0.3.0
[pip3] torch_geometric==2.4.0
[pip3] torch-struct==0.5
[pip3] torchaudio==2.1.0a0+30668af
[pip3] torchdata==0.7.0a0+757c032
[pip3] torchmetrics==1.0.2
[pip3] torchmultimodal==0.1.0b0
[pip3] torchrec==0.3.2
[pip3] torchtext==0.16.0a0+b5e2a1b
[pip3] torchvision==0.16.0a0+9b82df4
[pip3] vector-quantize-pytorch==1.6.30
[conda] bert-pytorch              0.0.1a4                   dev_0    <develop>
[conda] blas                      1.0                         mkl
[conda] clip-anytorch             2.5.2                    pypi_0    pypi
[conda] coca-pytorch              0.0.7                    pypi_0    pypi
[conda] dalle2-pytorch            1.14.2                   pypi_0    pypi
[conda] ema-pytorch               0.2.3                    pypi_0    pypi
[conda] magma-cuda116             2.6.1                         1    pytorch
[conda] mkl                       2023.1.0         h6d00ec8_46342
[conda] mkl-include               2023.1.0         h06a4308_46342
[conda] mkl-service               2.4.0           py310h5eee18b_1
[conda] mkl_fft                   1.3.6           py310h1128e8f_1
[conda] mkl_random                1.2.2           py310h1128e8f_1
[conda] numpy                     1.24.3          py310h5f9d8c6_1
[conda] numpy-base                1.24.3          py310hb5e798b_1
[conda] open-clip-torch           2.20.0                   pypi_0    pypi
[conda] pytorch-transformers      1.2.0                    pypi_0    pypi
[conda] pytorch-triton            2.1.0+e6216047b8          pypi_0    pypi
[conda] pytorch-warmup            0.1.1                    pypi_0    pypi
[conda] rotary-embedding-torch    0.2.6                    pypi_0    pypi
[conda] torch                     2.2.0a0+git5648c9b           dev_0    <develop>
[conda] torch-fidelity            0.3.0                    pypi_0    pypi
[conda] torch-geometric           2.4.0                    pypi_0    pypi
[conda] torch-struct              0.5                      pypi_0    pypi
[conda] torchaudio                2.1.0a0+30668af           dev_0    <develop>
[conda] torchdata                 0.7.0a0+757c032          pypi_0    pypi
[conda] torchmetrics              1.0.2                    pypi_0    pypi
[conda] torchmultimodal           0.1.0b0                  pypi_0    pypi
[conda] torchrec                  0.3.2                     dev_0    <develop>
[conda] torchtext                 0.16.0a0+b5e2a1b           dev_0    <develop>
[conda] torchvision               0.16.0a0+9b82df4           dev_0    <develop>
[conda] vector-quantize-pytorch   1.6.30                   pypi_0    pypi
```

### Versions

main

cc @msaroufim @wconstab @bdhirsh @anijain2305 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @ngimel @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov