a
    þdo
  ã                   @   s`   d dl mZ d dlmZmZ d dlmZ eeeeddœdd„Zeedœd	d
„ZG dd„ dƒZ	dS )é    )ÚQueue)ÚAnyÚCallable©Úrank_zero_deprecationN)ÚqueueÚfuncÚargsÚkwargsÚreturnc                 O   s,   t dƒ ddlm} || |g|¢R i |¤ŽS )Nz®`pytorch_lightning.utilities.xla_device.inner_f` has been deprecated in v1.8.0 and will be removed in v2.0.0. This class is internal but you can copy over its implementation.r   )Ú_inner_f)r   Ú!lightning_fabric.accelerators.tpur   )r   r   r	   r
   r   © r   úo/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/pytorch_lightning/utilities/xla_device.pyÚinner_f   s
    ÿr   )r   r   c                 C   s   t dƒ ddlm} || ƒS )Nz·`pytorch_lightning.utilities.xla_device.pl_multi_process` has been deprecated in v1.8.0 and will be removed in v2.0.0. This class is internal but you can copy over its implementation.r   )Ú_multi_process)r   r   r   )r   r   r   r   r   Úpl_multi_process   s
    ÿr   c                   @   s>   e Zd Zddœdd„Zeedœdd„ƒZeedœdd„ƒZdS )	ÚXLADeviceUtilsN)r   c                 C   s   t dƒ d S )NzŒ`pytorch_lightning.utilities.xla_device.XLADeviceUtils` has been deprecated in v1.8.0 and will be removed in v2.0.0. This class is internal.r   )Úselfr   r   r   Ú__init__*   s    ÿzXLADeviceUtils.__init__c                  C   s   t dƒ ddlm}  t| ƒS )Nz›`pytorch_lightning.utilities.xla_device.XLADeviceUtils.xla_available` has been deprecated in v1.8.0 and will be removed in v2.0.0. This method is internal.r   ©Ú_XLA_AVAILABLE)r   Ú"pytorch_lightning.accelerators.tpur   Úboolr   r   r   r   Úxla_available0   s
    ÿzXLADeviceUtils.xla_availablec                  C   s   t dƒ ddlm}  |  ¡ S )NzÙ`pytorch_lightning.utilities.xla_device.XLADeviceUtils.tpu_device_exists` has been deprecated in v1.8.0 and will be removed in v2.0.0. Please use `pytorch_lightning.accelerators.TPUAccelerator.is_available()` instead.r   ©ÚTPUAccelerator)r   r   r   Zis_availabler   r   r   r   Útpu_device_exists:   s
    ÿz XLADeviceUtils.tpu_device_exists)Ú__name__Ú
__module__Ú__qualname__r   Ústaticmethodr   r   r   r   r   r   r   r   )   s
   	r   )
Úmultiprocessingr   Útypingr   r   Zpytorch_lightning.utilitiesr   r   r   r   r   r   r   r   Ú<module>   s
   

