§
    ­¸j  ã                  ó,   — d Z ddlmZ ddlZdgZdd„ZdS )	zEVersion-compatible access to the ``torch.compiler`` state predicates.é    )ÚannotationsNÚis_compilingÚreturnÚboolc                 óŒ   — t          t          j        dd¦  «        } | �
 | ¦   «         nt          j                             ¦   «         S )aš  Return whether the current execution is inside a ``torch.compile`` graph.

    PyTorch 2.3 added the public ``torch.compiler.is_compiling`` predicate. RF-DETR supports
    PyTorch 2.2, where the equivalent Dynamo predicate remains the compatible fallback. The
    public name is looked up on every call rather than bound once at import: that keeps
    ``torch._dynamo`` untouched wherever the public predicate exists, and lets a test patch
    either torch predicate to drive the compile-only branches on CPU without a real compile.

    Returns:
        Whether Dynamo is compiling the current code path.

    Examples:
        >>> is_compiling()
        False
    r   N)ÚgetattrÚtorchÚcompilerÚ_dynamor   )Ú	predicates    úi/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/rfdetr/utilities/compiler.pyr   r      s:   € õ  �œ¨¸Ñ=Ô=€IØ#Ð/ˆ9ˆ9‰;Œ;ˆ;µU´]×5OÒ5OÑ5QÔ5QÐQó    )r   r   )Ú__doc__Ú
__future__r   r	   Ú__all__r   © r   r   ú<module>r      sU   ðð LÐ Kà "Ð "Ð "Ð "Ð "Ð "à €€€àÐ
€ðRð Rð Rð Rð Rð Rr   