mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 11:17:07 +08:00
[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__)
|
||||
|
||||
# neuron has too old torch
|
||||
HAS_TRITON = find_spec(
|
||||
"triton") is not None and not current_platform.is_neuron()
|
||||
HAS_TRITON = (
|
||||
find_spec("triton") is not None
|
||||
and not current_platform.is_xpu() # Not compatible
|
||||
and not current_platform.is_neuron() # neuron has too old torch
|
||||
)
|
||||
|
||||
if not HAS_TRITON:
|
||||
logger.info("Triton not installed; certain GPU-related functions"
|
||||
" will not be available.")
|
||||
logger.info("Triton not installed or not compatible; certain GPU-related"
|
||||
" functions will not be available.")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user