mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
Adapt for iluvatar gpu (#2684)
This commit is contained in:
@@ -33,6 +33,8 @@ if current_platform.is_cuda() and current_platform.available():
|
||||
"Verify environment consistency between compilation and FastDeploy installation. "
|
||||
"And ensure the Paddle version supports FastDeploy's custom operators"
|
||||
)
|
||||
if current_platform.is_iluvatar():
|
||||
from fastdeploy.model_executor.ops.iluvatar import get_padding_offset
|
||||
import re
|
||||
|
||||
from fastdeploy import envs
|
||||
@@ -377,4 +379,4 @@ def create_and_set_parameter(layer: nn.Layer, name: str,
|
||||
dtype=tensor.dtype,
|
||||
default_initializer=paddle.nn.initializer.Constant(0),
|
||||
))
|
||||
getattr(layer, name).set_value(tensor)
|
||||
getattr(layer, name).set_value(tensor)
|
||||
|
Reference in New Issue
Block a user