openfold
openfold copied to clipboard
Error during setup.py install with PyTorch2.1.2 and CUDA 12.1
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)
Please try the pl_upgrades branch with my PR #496 applied.
PR #496 is now merged to the pl_upgrades branch. Maybe it fixes this issue @happy-nozaki ?
Confirmed fixed! Thank you! 🙏
My pleasure @happy-nozaki ! So let's close this? You likely can, I cannot.