openfold icon indicating copy to clipboard operation
openfold copied to clipboard

unified memory

Open rmarabini opened this issue 2 years ago • 2 comments

Hi,

Is openfold able to use "unified memory"?

When using alphafold adding the following variables

export TF_FORCE_UNIFIED_MEMORY='1' export XLA_PYTHON_CLIENT_MEM_FRACTION='4.0' export TF_FORCE_GPU_ALLOW_GROWTH=true

increased the size of the sequence that can be processed (of course, the use of unified memory decreases speed) I have notice that this same approach does not seem to work for openfold.

In summary the question is: Can I force openfold to use unified memory? How?

rmarabini avatar Oct 11 '22 12:10 rmarabini

OpenFold is based on PyTorch, not TensorFlow, and doesn't recognize those flags. PyTorch does not have CUDA Unified Memory support. However, we do have a bunch of optimizations that make inference on sequences of length 4700 possible on a single A100 (check out the "long_sequence_inference" config preset). Beyond that point, the accuracy of OF/AF isn't that good anyway.

gahdritz avatar Oct 11 '22 22:10 gahdritz

Thanks for the info.

rmarabini avatar Oct 13 '22 12:10 rmarabini