ffcv icon indicating copy to clipboard operation
ffcv copied to clipboard

Error when using install ffcv using guidance command.

Open HaoKang-Timmy opened this issue 3 years ago • 6 comments

Hi, I am trying to install ffcv on my server. Here are the server settings.

Platform:amd-linux
GPU: 1*RTX02080Ti

When I use the default code to create the environment, and set up the environment, I could not move data to gpu and an error occurred. Here is the error:

Torch not compiled with CUDA enabled

I have installed GPU driver on my server. Could you please tell me why this happens?

HaoKang-Timmy avatar Dec 21 '22 13:12 HaoKang-Timmy

Same issue here, torch.cuda.is_available() will return False in the conda env where I installed ffcv, while I can use GPU normally in any other environment.

My conda env was created following the instructions as conda create -y -n ffcv python=3.9 cupy pkg-config compilers libjpeg-turbo opencv pytorch torchvision cudatoolkit=11.3 numba -c pytorch -c conda-forge. Then I installed ffcv with pip install ffcv.

Morales97 avatar Jan 19 '23 14:01 Morales97

Hi! What versions of CUDA do you have installed? And what does torch.__version__ return?

andrewilyas avatar Jan 29 '23 00:01 andrewilyas

Hi @andrewilyas,

I was having the same problem. torch.__version__ returns 1.13.1. Would you recommend installing torch 1.10 instead (this was a previous configuration for which ffcv worked for me)?

Thanks in advance!

arnaghosh avatar Feb 15 '23 23:02 arnaghosh

I had the same issue creating the conda env using the instructions. This env seems to work for me conda create -y -n ffcv python=3.9 cupy pkg-config compilers libjpeg-turbo opencv pytorch torchvision torchaudio pytorch-cuda=11.7 numba -c pytorch -c conda-forge -c nvidia

dngfra avatar Feb 21 '23 13:02 dngfra

Thanks for the update @dngfra, it seems that the issue was a mismatch between pytorch and cuda versions.

arnaghosh avatar Feb 21 '23 18:02 arnaghosh

The complete command (as of August 2023) is

conda create -n ffcv python=3.9 cupy pkg-config libjpeg-turbo opencv pytorch torchvision cudatoolkit=11.6 numba -c conda-forge -c pytorch && conda activate ffcv && conda update ffmpeg && pip install ffcv

When running the part

conda update ffmpeg

I see:

The following packages will be DOWNGRADED:

  python_abi                                     3.9-3_cp39 --> 3.9-2_cp39 
  pytorch                     2.0.0-cuda112py39ha9981d0_200 --> 2.0.0-cpu_generic_py39h000fad7_1 
  torchvision                  0.15.2-cuda112py39h22a746e_1 --> 0.15.2-cpu_py39hcf778cf_1 

Notice pytorch is being substituted by its CPU version.

In my case, not updating ffmpeg solved the issue.

lucasresck avatar Aug 01 '23 17:08 lucasresck