fix import image_ops error on some platforms (#4559)

This commit is contained in:
JYChen
2025-10-24 16:09:20 +08:00
committed by GitHub
parent 5fbc653238
commit 83d45af1f3
2 changed files with 5 additions and 2 deletions

View File

@@ -259,7 +259,7 @@ class DCUForwardMeta(ForwardMeta):
@dataclass
class HPUForwardMeta:
class HPUForwardMeta(ForwardMeta):
"""
HPUForwardMeta is used to store the global meta information of the forward on intel HPU.
"""

View File

@@ -15,6 +15,7 @@
"""
from fastdeploy.platforms import current_platform
from fastdeploy.utils import llm_logger as logger
if current_platform.is_cuda() or current_platform.is_maca():
from fastdeploy.model_executor.ops.gpu import (
@@ -32,6 +33,8 @@ elif current_platform.is_iluvatar():
text_image_index_out,
)
else:
raise ImportError("Unsupported platform, only support CUDA, MACA and XPU")
text_image_gather_scatter = None
text_image_index_out = None
logger.warning("Unsupported platform, image ops only support CUDA, XPU, MACA and Iluvatar")
__all__ = ["text_image_gather_scatter", "text_image_index_out"]