mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +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:
@@ -120,7 +120,9 @@ class MTPProposer(Proposer):
|
||||
elif current_platform.is_cuda() or current_platform.is_maca():
|
||||
self._propose = self._propose_cuda
|
||||
else:
|
||||
raise RuntimeError("Unsupported platform.")
|
||||
raise RuntimeError(
|
||||
f"Unsupported platform for MTP: {current_platform}. " f"Supported platforms: CUDA, MACA, XPU"
|
||||
)
|
||||
|
||||
self.sampler = MTPSampler(fd_config)
|
||||
self.model_inputs = ProposerInputBatch(self.fd_config, self.target_model_inputs)
|
||||
|
||||
Reference in New Issue
Block a user