+
    ˜°³j7  ã                   ó6   € ^ RI Ht ^ RIt^ RIHt RR R lltR# )é    )ÚAnyN)Ú_get_device_indexc                óH   € V ^8„  d   QhR\         R\        R\        R\        /# )é   ÚdeviceÚoptionalÚ	allow_cpuÚreturn)r   ÚboolÚint)Úformats   "ÚQ/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/xpu/_utils.pyÚ__annotate__r   	   s2   € ÷ @ñ @Üð@Üð@Ü48ð@äñ@ó    c                ó$  € \        V \        4      '       d   V # \        V \        4      '       d   \        P                  ! V 4      p \        V \        P                  4      '       dH   V'       d!   V P
                  R9  d   \        RV  24      hMV P
                  R8w  d   \        RV  24      h\        P                  P                  4       '       g7   \        V \        P                  P                  4      '       d   V P                  # \        WV4      # )aˆ  Get the device index from :attr:`device`, which can be a torch.device
object, a Python integer, or ``None``.

If :attr:`device` is a torch.device object, returns the device index if it
is a XPU device. Note that for a XPU device without a specified index,
i.e., ``torch.device('xpu')``, this will return the current default XPU
device if :attr:`optional` is ``True``. If :attr:`allow_cpu` is ``True``,
CPU devices will be accepted and ``-1`` will be returned in this case.

If :attr:`device` is a Python integer, it is returned as is.

If :attr:`device` is ``None``, this will return the current default XPU
device if :attr:`optional` is ``True``.
Úxpuz'Expected a xpu or cpu device, but got: z Expected a xpu device, but got: )r   Úcpu)Ú
isinstancer   ÚstrÚtorchr   ÚtypeÚ
ValueErrorÚjitÚis_scriptingr   ÚidxÚ_torch_get_device_index)r   r   r	   s   &&&r   r   r   	   sÉ   € ô" �&œ#×ÒØˆÜ�&œ#×ÒÜ—’˜fÓ%ˆÜ�&œ%Ÿ,™,×'Ò'ßØ�{‰{ .Ô0Ü Ð#JÈ6È(Ð!SÓTÐTð 1à�[‰[˜EÔ!ÜÐ?À¸xÐHÓIÐIÜ�9‰9×!Ñ!×#Ò#Ü�fœeŸi™i×.Ñ.×/Ò/Ø—:‘:ÐÜ" 6°YÓ?Ð?r   )FF)Útypingr   r   Útorch._utilsr   r   © r   r   Ú<module>r       s   ðÝ ã õ F÷@ñ @r   