
    ړir                    @    d dl mZ d dlmZ ddlmZ erd dlmZ ddZy)	    )annotations)TYPE_CHECKING   )is_torch_available)nnc                    t               sydd l}|j                  j                         sydd l}t        | |j                  j                  j                        xs t        | dd      S )NFr   _is_fsdp_managed_module)	r   torchdistributedis_availabletorch.distributed.fsdp
isinstancefsdpFullyShardedDataParallelgetattr)moduler
   s     E/tmp/pip-target-gsye3yef/lib/python/transformers/integrations/fsdp.pyis_fsdp_managed_moduler      s]    ))+!fe//44MMN RY)5S     N)r   z	nn.Modulereturnbool)	
__future__r   typingr   utilsr   r
   r   r    r   r   <module>r      s    #   & r   