Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_get_cuda_arch_flags() error #21

Closed
hnsigma opened this issue May 23, 2023 · 8 comments
Closed

_get_cuda_arch_flags() error #21

hnsigma opened this issue May 23, 2023 · 8 comments

Comments

@hnsigma
Copy link

hnsigma commented May 23, 2023

Have everything properly installed but get this issue both in the notebook and on local version

line 1773, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
~~~~~~~~~^^^^
IndexError: list index out of range

@fuadmefleh
Copy link

fuadmefleh commented May 23, 2023

The top of the error likely mentions that you have no CUDA runtime installed.

$ python gradio_app.py

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7'

@hnsigma
Copy link
Author

hnsigma commented May 23, 2023

I defo have cuda installed, and tried various versions, I tried using conda also, always the same error. Is there an environment setup I need to do perhaps that didn't happen automatically with the install?

@Zeqiang-Lai
Copy link
Collaborator

It should run without any special setup. Could you run the following snippet with python interpreter at your env and see if it print True ?

import torch
print(torch.cuda.is_available())

@hnsigma
Copy link
Author

hnsigma commented May 23, 2023

I get false, which is very strange, I have installed cuda several times now. Apologies for my errors! could it be an environment variable issue?

@Zeqiang-Lai
Copy link
Collaborator

It might be, but I could not give a certain answer. Another option is to use our online colab demo where you could obtain a free GPU from google.

@genecyber
Copy link

online collab demo is throwing the same error.

@Zeqiang-Lai
Copy link
Collaborator

online collab demo is throwing the same error.

Did you select a GPU via Runtime/Change runtime type ?

@d8ahazard
Copy link

d8ahazard commented May 24, 2023

Probably need to add "--extra-index-url https://download.pytorch.org/whl/cu118" to the top of the requirements.txt file so that it knows to install torch+cuda, versus just torch. ;)

Or, more specifically, you need to ensure your installed torch version includes "+cu118" or whichever version of the CUDA toolkit you have installed.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants