mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
fix import image_ops error on some platforms (#4559)
This commit is contained in:
@@ -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.
|
||||
"""
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user