Repository: pytorch
Issue: Package manager install on Nvidia Grace Hopper does not make cuda available
Labels: module: binaries,module: cuda,triaged,module: arm

### 🐛 Describe the bug

Following any package manager install then running:

`
import torch
torch.cuda.is_available()
`
returns false

If I build a wheel from source it is successful, but the wheel will only work on my system and cannot be used in a docker container.

### Versions

Conda env using the pip/pypi install (conda install fails)
PyTorch version: 2.2.2
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (aarch64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: 14.0.0-1ubuntu1.1
CMake version: version 3.26.4
Libc version: glibc-2.35

Python version: 3.12.1 | packaged by Anaconda, Inc. | (main, Jan 19 2024, 15:43:47) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-6.5.0-1013-nvidia-64k-aarch64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GH200 480GB
Nvidia driver version: 550.54.15
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_precompiled.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_graph.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_heuristic.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops.so.9.0.0
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_adv.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_cnn.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_engines_precompiled.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_engines_runtime_compiled.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_graph.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_heuristic.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_ops.so.9
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       aarch64
CPU op-mode(s):                     64-bit
Byte Order:                         Little Endian
CPU(s):                             72
On-line CPU(s) list:                0-71
Vendor ID:                          ARM
Model name:                         Neoverse-V2
Model:                              0
Thread(s) per core:                 1
Core(s) per socket:                 72
Socket(s):                          1
Stepping:                           r0p0
Frequency boost:                    disabled
CPU max MHz:                        3393.0000
CPU min MHz:                        81.0000
BogoMIPS:                           2000.00
Flags:                              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti
L1d cache:                          4.5 MiB (72 instances)
L1i cache:                          4.5 MiB (72 instances)
L2 cache:                           72 MiB (72 instances)
L3 cache:                           114 MiB (1 instance)
NUMA node(s):                       9
NUMA node0 CPU(s):                  0-71
NUMA node1 CPU(s):                  
NUMA node2 CPU(s):                  
NUMA node3 CPU(s):                  
NUMA node4 CPU(s):                  
NUMA node5 CPU(s):                  
NUMA node6 CPU(s):                  
NUMA node7 CPU(s):                  
NUMA node8 CPU(s):                  
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: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; __user pointer sanitization
Vulnerability Spectre v2:           Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.2.2
[pip3] torchaudio==2.2.2
[pip3] torchvision==0.17.2
[conda] No relevant packages

Source build version:

PyTorch version: 2.3.0a0+gita157a0d
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (aarch64)
GCC version: (conda-forge gcc 12.3.0-5) 12.3.0
Clang version: 14.0.0-1ubuntu1.1
CMake version: version 3.26.4
Libc version: glibc-2.35

Python version: 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:26:55) [GCC 12.3.0] (64-bit runtime)
Python platform: Linux-6.5.0-1013-nvidia-64k-aarch64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GH200 480GB
Nvidia driver version: 550.54.15
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_precompiled.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_graph.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_heuristic.so.9.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops.so.9.0.0
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_adv.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_cnn.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_engines_precompiled.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_engines_runtime_compiled.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_graph.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_heuristic.so.9
/usr/local/cuda-12.4/targets/sbsa-linux/lib/libcudnn_ops.so.9
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       aarch64
CPU op-mode(s):                     64-bit
Byte Order:                         Little Endian
CPU(s):                             72
On-line CPU(s) list:                0-71
Vendor ID:                          ARM
Model name:                         Neoverse-V2
Model:                              0
Thread(s) per core:                 1
Core(s) per socket:                 72
Socket(s):                          1
Stepping:                           r0p0
Frequency boost:                    disabled
CPU max MHz:                        3393.0000
CPU min MHz:                        81.0000
BogoMIPS:                           2000.00
Flags:                              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti
L1d cache:                          4.5 MiB (72 instances)
L1i cache:                          4.5 MiB (72 instances)
L2 cache:                           72 MiB (72 instances)
L3 cache:                           114 MiB (1 instance)
NUMA node(s):                       9
NUMA node0 CPU(s):                  0-71
NUMA node1 CPU(s):                  
NUMA node2 CPU(s):                  
NUMA node3 CPU(s):                  
NUMA node4 CPU(s):                  
NUMA node5 CPU(s):                  
NUMA node6 CPU(s):                  
NUMA node7 CPU(s):                  
NUMA node8 CPU(s):                  
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: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; __user pointer sanitization
Vulnerability Spectre v2:           Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] mypy==1.8.0
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.4
[pip3] onnx==1.15.0
[pip3] optree==0.9.1
[pip3] torch==2.3.0a0+gita157a0d
[pip3] torch-mlir==0.0.1
[pip3] torchvision==0.18.0a0+ba64d65
[conda] cudatoolkit               11.8.0              hdd48f4a_13    conda-forge
[conda] libmagma                  2.7.2                h2e22a8f_2    conda-forge
[conda] libmagma_sparse           2.7.2                h9f9e9bb_3    conda-forge
[conda] magma                     2.7.2                h4902ff7_3    conda-forge
[conda] numpy                     1.26.4          py310he45c16d_0  
[conda] numpy-base                1.26.4          py310h15d264d_0  
[conda] optree                    0.9.1                    pypi_0    pypi
[conda] torch                     2.3.0a0+gita157a0d           dev_0    <develop>
[conda] torch-mlir                0.0.1                    pypi_0    pypi
[conda] torchvision               0.18.0a0+ba64d65           dev_0    <develop>

cc @seemethere @malfet @osalpekar @atalman @ptrblck @snadampal