aqlaboratory / openfold

Trainable, memory-efficient, and GPU-friendly PyTorch reproduction of AlphaFold 2
Apache License 2.0
2.77k stars 533 forks source link

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

Open happy-nozaki opened 4 weeks ago

happy-nozaki commented 4 weeks ago

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::type>::cast_op_type pybind11::detail::cast_op(make_caster&)': /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::template cast_op_type(); | ^ /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::template cast_op_type(); | ^ /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::template cast_op_type(); | ^

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)

vaclavhanzl commented 2 days ago

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