openfold icon indicating copy to clipboard operation
openfold copied to clipboard

Error during setup.py install with PyTorch2.1.2 and CUDA 12.1

Open happy-nozaki opened this issue 1 year ago • 4 comments

I’m encountering build errors when running python setup.py install in an OpenFold environment with PyTorch (version 2.1.2), CUDA 12.1, and g++ 12.2. The error occurs during the compilation of CUDA extensions. Below is the detailed environment and error log.

usr/local/miniconda3/envs/openfold_env/lib/python3.10/site-packages/torch/include/pybind11/detail/../cast.h: In function 'typename pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type>::cast_op_type<T> pybind11::detail::cast_op(make_caster<T>&)': /usr/local/miniconda3/envs/openfold_env/lib/python3.10/site-packages/torch/include/pybind11/detail/../cast.h:45:120: error: expected template-name before '<' token 45 | return caster.operator typename make_caster<T>::template cast_op_type<T>(); | ^ /usr/local/miniconda3/envs/openfold_env/lib/python3.10/site-packages/torch/include/pybind11/detail/../cast.h:45:120: error: expected identifier before '<' token /usr/local/miniconda3/envs/openfold_env/lib/python3.10/site-packages/torch/include/pybind11/detail/../cast.h:45:123: error: expected primary-expression before '>' token 45 | return caster.operator typename make_caster<T>::template cast_op_type<T>(); | ^ /usr/local/miniconda3/envs/openfold_env/lib/python3.10/site-packages/torch/include/pybind11/detail/../cast.h:45:126: error: expected primary-expression before ')' token 45 | return caster.operator typename make_caster<T>::template cast_op_type<T>(); | ^

Environment: Python: 3.10 PyTorch: 2.1.2 CUDA: 12.1 G++: 12.2 PyBind11: 2.13.6 OpenFold version: 2.0.0 Operating System: Linux (Ubuntu 22.10)

happy-nozaki avatar Sep 25 '24 16:09 happy-nozaki

Please try the pl_upgrades branch with my PR #496 applied.

vaclavhanzl avatar Oct 23 '24 11:10 vaclavhanzl

PR #496 is now merged to the pl_upgrades branch. Maybe it fixes this issue @happy-nozaki ?

vaclavhanzl avatar Nov 07 '24 20:11 vaclavhanzl

Confirmed fixed! Thank you! 🙏

happy-nozaki avatar Nov 14 '24 15:11 happy-nozaki

My pleasure @happy-nozaki ! So let's close this? You likely can, I cannot.

vaclavhanzl avatar Nov 14 '24 18:11 vaclavhanzl