[XPU] avoid triton import for xpu (#9440)
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
This commit is contained in:
parent
33bab41060
commit
056a68c7db
@ -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.")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user