Conda pytorch-cuda=12 for arm64 and Grace Hopper

Ok. It is set since I’ve been using the code base on another system. I will check again. Thanks for confirming that cuda binaries are there.

So the issue is whenever I deactivate and reactivate the conda environment, the cuda test returns False. Does it not work with conda? I created a new thread with the issue, so we can continue the conversation over there. Thanks.

I was able to install torch with this:

pip install torchvision --index-url https://download.pytorch.org/whl/cu124

However, the resulting torchvision directory has a transforms.py instead of a directory named transforms?

$ ls -alh
total 36K
drwxrwxr-x  5 thoth thoth 4.0K Sep 30 20:28 .
drwxr-xr-x 72 thoth thoth 4.0K Sep 30 20:22 ..
drwxrwxr-x  3 thoth thoth 4.0K Sep 30 20:14 datasets
-rw-rw-r--  1 thoth thoth  129 Sep 30 20:14 __init__.py
drwxrwxr-x  3 thoth thoth 4.0K Sep 30 21:05 models
drwxrwxr-x  2 thoth thoth 4.0K Sep 30 20:14 __pycache__
-rw-rw-r--  1 thoth thoth 6.8K Sep 30 20:14 transforms.py
-rw-rw-r--  1 thoth thoth 2.0K Sep 30 20:14 utils.py

$ pwd
/home/thoth/.pyenv/versions/3.12.6/lib/python3.12/site-packages/torchvision

^that is on the grace hopper.

Here is my personal machine:

$ ls -alh
Permissions Size User  Date Modified Name
.rw-r--r--  3.5k thoth 21 Sep 07:12  __init__.py
drwxr-xr-x     - thoth 21 Sep 07:12  __pycache__
.rw-r--r--  8.2M thoth 21 Sep 07:12  _C.so
.rw-r--r--  1.4k thoth 21 Sep 07:12  _internally_replaced_utils.py
.rw-r--r--  7.2k thoth 21 Sep 07:12  _meta_registrations.py
.rw-r--r--   934 thoth 21 Sep 07:12  _utils.py
drwxr-xr-x     - thoth 21 Sep 07:12  datasets
.rw-r--r--  3.1k thoth 21 Sep 07:12  extension.py
.rw-r--r--  505k thoth 21 Sep 07:12  image.so
drwxr-xr-x     - thoth 21 Sep 07:12  io
drwxr-xr-x     - thoth 21 Sep 07:12  models
drwxr-xr-x     - thoth 21 Sep 07:12  ops
drwxr-xr-x     - thoth 21 Sep 07:12  transforms
drwxr-xr-x     - thoth 21 Sep 07:12  tv_tensors
.rw-r--r--   27k thoth 21 Sep 07:12  utils.py
.rw-r--r--   203 thoth 21 Sep 07:12  version.py

$ pwd
/home/thoth/.pyenv/versions/3.12.6/lib/python3.12/site-packages/torchvision

Why the huge difference?

And I get these errors:

cannot import name 'InterpolationMode' from 'torchvision.transforms' (/home/thoth/.pyenv/versions/3.12.6/lib/python3.12/site-packages/torchvision/transforms.py)