mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[XPU]add enable_logprob (#5279)
* [XPU]Update document * [XPU]Update documentation * [XPU]add enable_logprob * Fix code style issues * “doc” * “docs” * “doc” * Fix code style via pre-commit --------- Co-authored-by: root <root@gajl-bbc-onlinec-com-1498354.gajl.baidu.com>
This commit is contained in:
@@ -69,8 +69,8 @@ def get_worker(fd_config: FDConfig, local_rank: int, rank: int) -> WorkerBase:
|
||||
"""
|
||||
get worker of different device
|
||||
"""
|
||||
if fd_config.model_config.enable_logprob and not current_platform.is_cuda():
|
||||
raise NotImplementedError("Only CUDA platform supports logprob.")
|
||||
if fd_config.model_config.enable_logprob and not current_platform.is_cuda() and not current_platform.is_xpu():
|
||||
raise NotImplementedError("Only CUDA and XPU platforms support logprob.")
|
||||
if current_platform.is_dcu():
|
||||
from fastdeploy.worker.dcu_worker import DcuWorker
|
||||
|
||||
|
||||
Reference in New Issue
Block a user