openfold
openfold copied to clipboard
RuntimeError: attn_softmax_inplace_forward_ not implemented on CPU
Hi, I encountered this error while running inference.
modelling for Base185
INFO:/data1/hanwei/openfold/openfold/utils/script_utils.py:Successfully loaded JAX parameters at openfold/resources/params/params_model_1.npz...
INFO:run_pretrained_openfold.py:Using precomputed alignments for Base185 at /data1/hanwei/openfold/20230314_base_modelling/outputs/alignments...
INFO:/data1/hanwei/openfold/openfold/utils/script_utils.py:Running inference for Base185...
Traceback (most recent call last):
File "run_pretrained_openfold.py", line 391, in
+1
+1
I had the same issue, likely did not set CUDA_HOME or other cuda environment variables correctly, so it installed cpu version.
You can check the first line output when running python setup.py install
.
https://github.com/aqlaboratory/openfold/blob/b5fa2ba316c2ed096fac05390076a2682819fb5f/setup.py#L42
@jozhang97 I tried reinstalling while setting the CUDA variables and it fixed the issue. Thanks for the help!
@egurapha Running into the same issue currently, where is the CUDA_HOME and other cuda environment varibale seted?
@szhang99-bu,
If you are using CUDA
through a conda environment install like (conda install nvidia/label/cuda-11.3.1::cuda
), you might need to have these env variables set
, so that it correctly points to the environment's CUDA
directories.
Need to have these before installing openfold, as @jozhang97 pointed out.
export CUDA_HOME=$CONDA_PREFIX
export CUDA_PATH=$CONDA_PREFIX
export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH