mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-26 02:14:06 +08:00
[BugFix][Optimization] Replace silent failures with catchable exceptions and informative error messages (#6533)
* init * init * fix format * add * add files * add ut * fix some * add ut * add more * add * fix pre-commit * fix pre-commit * fix cover * skip long seq * add * add * fix * remove not need * fix set attr * fix comments * fix comments * fix failed tests --------- Co-authored-by: gongweibao <gognweibao@baidu.com>
This commit is contained in:
@@ -26,10 +26,12 @@ from typing import TYPE_CHECKING, List, Optional, Tuple
|
||||
|
||||
import paddle
|
||||
from paddle.nn.functional.flash_attention import flash_attn_unpadded
|
||||
from paddleformers.utils.log import logger
|
||||
|
||||
try:
|
||||
from paddle.nn.functional.flash_attention import flash_attention_v3_varlen
|
||||
except:
|
||||
except Exception as e:
|
||||
logger.debug(f"flash_attention_v3_varlen not available: {e}")
|
||||
flash_attention_v3_varlen = None
|
||||
|
||||
from fastdeploy.model_executor.layers.attention.ops import (
|
||||
|
||||
Reference in New Issue
Block a user