singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (SINGA-341) Add stride field to Tensor class
Date Sun, 13 May 2018 15:27:00 GMT


ASF subversion and git services commented on SINGA-341:

Commit a44d2e76b70a54e6ad1e063c0b8e895c43018b63 in incubator-singa's branch refs/heads/master
from Vaan Ng
[;h=a44d2e7 ]

Merge branch 'master' of into SINGA-341-351

> Add stride field to Tensor class
> --------------------------------
>                 Key: SINGA-341
>                 URL:
>             Project: Singa
>          Issue Type: Improvement
>            Reporter: wangwei
>            Priority: Major
> The current Tensor class stores data in a contiguous chunk of memory. It is a very simple
implementation. However, it is difficult to support some operations. For example,
> {code}
> Tensor a = b.transpose()
> Tensor d = a + c
> {code}
> Like other tensor implementation (e.g. numpy), Tensor a and b shares memory. The addition
operation has to do real transpose, which incurs some overhead. With stride, we can avoid
the transpose operation. Instead, we enumerate each element of a and c using the index, shape
and stride information.
> More over, stride is necessary for broadcasting operations. []
> Code in src/core/ tensor_math_cpp.h tensor_math_cuda.h needs modification when
stride is added as a field/member of Tensor.

This message was sent by Atlassian JIRA

View raw message