Unverified Commit 056a68c7 authored by Yan Ma's avatar Yan Ma Committed by GitHub
Browse files

[XPU] avoid triton import for xpu (#9440)


Co-authored-by: default avatarCyrus Leung <tlleungac@connect.ust.hk>
Co-authored-by: default avatarCyrus Leung <cyrus.tl.leung@gmail.com>
parent 33bab410
...@@ -5,10 +5,12 @@ from vllm.platforms import current_platform ...@@ -5,10 +5,12 @@ from vllm.platforms import current_platform
logger = init_logger(__name__) logger = init_logger(__name__)
# neuron has too old torch HAS_TRITON = (
HAS_TRITON = find_spec( find_spec("triton") is not None
"triton") is not None and not current_platform.is_neuron() and not current_platform.is_xpu() # Not compatible
and not current_platform.is_neuron() # neuron has too old torch
)
if not HAS_TRITON: if not HAS_TRITON:
logger.info("Triton not installed; certain GPU-related functions" logger.info("Triton not installed or not compatible; certain GPU-related"
" will not be available.") " functions will not be available.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment