You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by "wangwei (JIRA)" <ji...@apache.org> on 2015/12/29 10:26:49 UTC

[jira] [Closed] (SINGA-31) Extend Blob to support xpu (cpu or gpu)

     [ https://issues.apache.org/jira/browse/SINGA-31?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

wangwei closed SINGA-31.
------------------------
    Resolution: Fixed

xpu is not needed. GPU is supported via SINGA-88.

> Extend Blob to support xpu (cpu or gpu)
> ---------------------------------------
>
>                 Key: SINGA-31
>                 URL: https://issues.apache.org/jira/browse/SINGA-31
>             Project: Singa
>          Issue Type: Bug
>            Reporter: wangwei
>
> The Blob class is adapted from Caffe's code.
> It supports both GPU and CPU by providing classes like
> {code}
> gpu_data();
> cpu_data();
> {code}
> For GPU mode, users call gpu_data(); For CPU mode, users' code call cpu_data. Hence, users have to write two pieces of code (one for GPU and one for CPU).
> To avoid code redundancy, SINGA adds one function in Blob class
> {code}
> xpu_data();
> {code}
> xpu is cpu or gpu and is defined at compile time. 
> Users write one piece of code which calls xpu_data() to get data from Blob. Depending on the compilation option, it will return GPU data or CPU data. This ticket just replaces the cpu to xpu and test with xpu=cpu. The GPU support (i.e., xpu=gpu) will be added in next release.
> The disadvantage of using xpu is that users cannot choose the running mode after compilation, and have to decide the running mode at compile time. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)