Open schmidt-ai opened 1 year ago
Thanks for reporting ! We are still working on the transition to PT2.1 @patricklabatut
Glad to hear it. Lmk if I can help.
I found the following works in pytorch 2.1:
def free_if_fsdp(x: FSDP):
if is_sharded_fsdp(x) and x._has_params:
handle = x._handle
_reshard(x, handle, True)
Looks like there are some breaking changes to the FSDP API in PyTorch 2.1.
For example,
dinov2.fsdp.__init__.py::free_if_fsdp
is broken when using torch==2.1:AttributeError: 'DinoVisionTransformer' object has no attribute '_handles'