§
    “©ºj½  ã                   óz   — d dl mZ d dlZd dlmZ d dlmZ d dlmZ  G d„ de¦  «        Z	dee
ef         d	e
fd
„ZdS )é    )ÚUnionN)Úoverride)ÚAccelerator)Ú_AcceleratorRegistryc                   óž  — e Zd ZdZedej        ddfd„¦   «         Zedd„¦   «         Ze	ede
eef         defd„¦   «         ¦   «         Ze	ede
eef         deej                 fd	„¦   «         ¦   «         Ze	edefd
„¦   «         ¦   «         Ze	edefd„¦   «         ¦   «         Ze	edefd„¦   «         ¦   «         Zeededdfd„¦   «         ¦   «         ZdS )ÚCPUAcceleratorzAccelerator for CPU devices.ÚdeviceÚreturnNc                 óB   — |j         dk    rt          d|› d�¦  «        ‚dS )zd
        Raises:
            ValueError:
                If the selected device is not CPU.
        ÚcpuzDevice should be CPU, got z	 instead.N)ÚtypeÚ
ValueError)Úselfr	   s     úq/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/lightning_fabric/accelerators/cpu.pyÚsetup_devicezCPUAccelerator.setup_device   s3   € ð Œ;˜%ÒÐÝÐK¸&ÐKÐKÐKÑLÔLÐLð  Ðó    c                 ó   — d S )N© )r   s    r   ÚteardownzCPUAccelerator.teardown$   s   € àˆr   Údevicesc                 ó    — t          | ¦  «        S )z!Accelerator device parsing logic.)Ú_parse_cpu_cores©r   s    r   Úparse_deviceszCPUAccelerator.parse_devices(   s   € õ   Ñ(Ô(Ð(r   c                 óP   — t          | ¦  «        } t          j        d¦  «        g| z  S )z*Gets parallel devices for the Accelerator.r   )r   Útorchr	   r   s    r   Úget_parallel_devicesz#CPUAccelerator.get_parallel_devices.   s)   € õ # 7Ñ+Ô+ˆÝ”˜UÑ#Ô#Ð$ wÑ.Ð.r   c                  ó   — dS )z!Get the devices when set to auto.é   r   r   r   r   Úauto_device_countz CPUAccelerator.auto_device_count5   s	   € ð ˆqr   c                  ó   — dS )z&CPU is always available for execution.Tr   r   r   r   Úis_availablezCPUAccelerator.is_available;   s	   € ð ˆtr   c                  ó   — dS )Nr   r   r   r   r   ÚnamezCPUAccelerator.nameA   s	   € ð ˆur   Úaccelerator_registryc                 ód   — |                      |                      ¦   «         | | j        ¬¦  «         d S )N)Údescription)Úregisterr$   Ú__name__)Úclsr%   s     r   Úregister_acceleratorsz$CPUAccelerator.register_acceleratorsF   s>   € ð 	×%Ò%Ø�HŠH‰JŒJØØœð 	&ñ 	
ô 	
ð 	
ð 	
ð 	
r   )r
   N)r)   Ú
__module__Ú__qualname__Ú__doc__r   r   r	   r   r   Ústaticmethodr   ÚintÚstrr   Úlistr   r    Úboolr"   r$   Úclassmethodr   r+   r   r   r   r   r      sÂ  € € € € € Ø&Ð&àðM 5¤<ð M°Dð Mð Mð Mñ „XðMð ðð ð ñ „Xðð Øð)˜u S¨# Xœð )°3ð )ð )ð )ñ „Xñ „\ð)ð Øð/ e¨C°¨H¤oð /¸$¸u¼|Ô:Lð /ð /ð /ñ „Xñ „\ð/ð
 Øð˜sð ð ð ñ „Xñ „\ðð Øð˜$ð ð ð ñ „Xñ „\ðð Øð�#ð ð ð ñ „Xñ „\ðð Øð
Ð9Mð 
ÐRVð 
ð 
ð 
ñ „Xñ „[ð
ð 
ð 
r   r   Ú	cpu_coresr
   c                 óî   — t          | t          ¦  «        r5|                      ¦   «                              ¦   «         rt	          | ¦  «        } t          | t          ¦  «        r| dk    rt          d¦  «        ‚| S )a�  Parses the cpu_cores given in the format as accepted by the ``devices`` argument in the
    :class:`~pytorch_lightning.trainer.trainer.Trainer`.

    Args:
        cpu_cores: An int > 0 or a string that can be converted to an int > 0.

    Returns:
        An int representing the number of processes

    Raises:
        MisconfigurationException:
            If cpu_cores is not an int > 0

    r   z>`devices` selected with `CPUAccelerator` should be an int > 0.)Ú
isinstancer1   ÚstripÚisdigitr0   Ú	TypeError)r5   s    r   r   r   P   sn   € õ �)�SÑ!Ô!ð # i§o¢oÑ&7Ô&7×&?Ò&?Ñ&AÔ&Að #Ý˜	‘N”Nˆ	å�i¥Ñ%Ô%ð Z¨°aª¨ÝÐXÑYÔYÐYàÐr   )Útypingr   r   Útyping_extensionsr   Ú)lightning_fabric.accelerators.acceleratorr   Ú&lightning_fabric.accelerators.registryr   r   r0   r1   r   r   r   r   ú<module>r?      s·   ðð Ð Ð Ð Ð Ð à €€€Ø &Ð &Ð &Ð &Ð &Ð &à AÐ AÐ AÐ AÐ AÐ AØ GÐ GÐ GÐ GÐ GÐ Gð6
ð 6
ð 6
ð 6
ð 6
�[ñ 6
ô 6
ð 6
ðr  c¨3 h¤ð °Cð ð ð ð ð ð r   