o
    Èhr  ã                   @  sB   d dl mZ d dlmZ ddlmZ erd dlmZ dd
d„ZdS )é    )Úannotations)ÚTYPE_CHECKINGé   )Úis_torch_available)ÚnnÚmoduleú	nn.ModuleÚreturnÚboolc                 C  sD   t ƒ sdS dd l}|j ¡ sdS dd l}t| |jjjƒp!t| ddƒS )NFr   Ú_is_fsdp_managed_module)	r   ÚtorchÚdistributedÚis_availableÚtorch.distributed.fsdpÚ
isinstanceÚfsdpÚFullyShardedDataParallelÚgetattr)r   r   © r   úr/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/transformers/integrations/fsdp.pyÚis_fsdp_managed_module   s   
ÿr   N)r   r   r	   r
   )	Ú
__future__r   Útypingr   Úutilsr   r   r   r   r   r   r   r   Ú<module>   s   