singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wangwei (JIRA)" <>
Subject [jira] [Closed] (SINGA-31) Extend Blob to support xpu (cpu or gpu)
Date Tue, 29 Dec 2015 09:26:49 GMT


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:
>             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
> 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

View raw message