You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by ch...@apache.org on 2020/07/14 06:58:36 UTC

[singa] branch dev updated: fix onnx device

This is an automated email from the ASF dual-hosted git repository.

chrishkchris pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/singa.git


The following commit(s) were added to refs/heads/dev by this push:
     new 95aa1a9  fix onnx device
     new becf6a9  Merge pull request #767 from joddiy/fix-onnx-device
95aa1a9 is described below

commit 95aa1a957e1724307e041711c277a245652fc6c8
Author: joddiy <jo...@qq.com>
AuthorDate: Tue Jul 14 14:38:25 2020 +0800

    fix onnx device
---
 python/singa/sonnx.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/singa/sonnx.py b/python/singa/sonnx.py
index 8929b12..e18437c 100755
--- a/python/singa/sonnx.py
+++ b/python/singa/sonnx.py
@@ -1733,7 +1733,7 @@ class SingaBackend(Backend):
                 weights[key] = val
             else:
                 x = tensor.from_numpy(val)
-                if device == 'CPU':
+                if device != 'CPU':
                     assert singa.USE_CUDA, "Your SINGA doesn't compile GPU module."
                     dev = device.create_cuda_gpu()
                 else: