mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-08 10:00:29 +08:00
[Sync] Update to latest code (#2679)
* [Sync] Update to latest code * Add new code files * Add new code files * update code * Try to fix build.sh * Try to fix build.sh * Update code * Update requirements.txt * Update code --------- Co-authored-by: Jiang-Jia-Jun <jiangjiajun@baidu.com>
This commit is contained in:
@@ -330,6 +330,8 @@ class ForwardMeta():
|
||||
decoder_batch_ids: Optional[paddle.Tensor] = None
|
||||
# for attention backend
|
||||
decoder_tile_ids_per_batch: Optional[paddle.Tensor] = None
|
||||
# is_decode_batch or not
|
||||
is_decode_batch: bool = False
|
||||
|
||||
@classmethod
|
||||
def init_forward_meta(cls, share_inputs: Dict,
|
||||
@@ -356,6 +358,11 @@ class ForwardMeta():
|
||||
"decoder_tile_ids_per_batch", None),
|
||||
)
|
||||
return ret
|
||||
|
||||
def clear_caches(self):
|
||||
"""safe clear caches"""
|
||||
if self.caches:
|
||||
del self.caches
|
||||
|
||||
|
||||
@dataclass
|
||||
|
Reference in New Issue
Block a user