Skip to content

Commit 1bcb21f

Browse files
author
AoxiangGeng
authored
[sdaa]:adapt hpinn and cgcnn on custom device sdaa (#1109)
1 parent f617f3b commit 1bcb21f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

deploy/python_infer/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ def _create_onnx_predictor(
214214
return predictor, config
215215

216216
def _check_device(self, device: str):
217-
if device not in ["cpu", "gpu", "npu", "xpu"]:
217+
if device not in ["cpu", "gpu", "npu", "xpu", "sdaa"]:
218218
raise ValueError(
219-
"Inference only supports 'gpu', 'cpu', 'npu' and 'xpu' devices, "
219+
"Inference only supports 'gpu', 'cpu', 'npu', 'xpu' and 'sdaa' devices, "
220220
f"but got {device}."
221221
)
222222

docs/zh/multi_device.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666

6767
| 问题类型 | 案例名称 | NVIDIA | 海光 | 太初 | 沐曦 |
6868
|-----|-----|-----|-----|-----|-----|
69-
| 材料设计 | [散射板设计(反问题)](./examples/hpinns.md) | ✅ | | | ✅ |
70-
| 材料设计 | [CGCNN](./examples/cgcnn.md) | ✅ | | | |
69+
| 材料设计 | [散射板设计(反问题)](./examples/hpinns.md) | ✅ | | | ✅ |
70+
| 材料设计 | [CGCNN](./examples/cgcnn.md) | ✅ | | | |
7171

7272
=== "地球科学(AI for Earth Science)"
7373

0 commit comments

Comments
 (0)