
    Iwi                     P    S r SSKrSSKrS\4S jrSS.S\S\S-  S\S-  4S jjrg)	z3Compatibility helpers for optional 5Hz LM backends.    Nreturnc                       [         R                  " S5        [         R                  " S5        g! [        [        4 a     gf = f)zGReturn whether the Triton modules required by nano-vllm import cleanly.tritonztriton.languageTF)	importlibimport_moduleImportErrorModuleNotFoundError     9/mnt/workspace/ACE-Step-1.5/acestep/llm_backend_compat.py _has_working_triton_installationr      s?    ) 12,- s   ,/ AA)platformdevicer   c                 j    Uc  [         R                  OUnU S:w  d  US:w  a  g[        5       (       a  g g)aA  Return a user-facing warning when vLLM should be skipped before initialization.

Args:
    device: The resolved device string for LM initialization.
    platform: Optional platform override for tests. Defaults to ``sys.platform``.

Returns:
    A warning string when vLLM should fall back to PyTorch, otherwise ``None``.
Ncudawin32zvLLM backend is unavailable on Windows because Triton is not installed or is incompatible. Falling back to the PyTorch backend. Use --backend pt to suppress this warning.)sysr   r   )r   r   active_platforms      r   get_vllm_preflight_warningr      s<     '/&6cllHO?g5'))	5r   )__doc__r   r   boolr   strr   r
   r   r   <module>r      sD    9  
$  GK # t sUYz r   