mxnet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lv, Tao A" <tao.a...@intel.com>
Subject RE: [RFC] Support for creation of Large Tensors in MXNet
Date Tue, 30 Apr 2019 02:18:29 GMT
Thank you Lin! I would expect the current MKL-DNN implementation already supports the scenario
you mentioned here. Can be verified by this issue: https://github.com/apache/incubator-mxnet/issues/13451

But as I said before, since we support flatten or reshape operators, so it's possible for
users to convert a tensor with large element size to a tensor with large dimension size. It
possibly will cause issue there.

To cover more cases, MKL-DNN is going to support INT64 dimension size in its coming 1.0 major
release.

-tao

-----Original Message-----
From: Lin Yuan [mailto:apeforest@gmail.com] 
Sent: Tuesday, April 30, 2019 12:56 AM
To: dev@mxnet.incubator.apache.org
Subject: Re: [RFC] Support for creation of Large Tensors in MXNet

Tao,

- what's the max size of dimensionality? Which data type is used to define dimensionality
(ndims)?
We assume the max size of dimensionality is relatively small. Hence `int` data type is used
to define ndim

- what's the max size of each dimension? Which data type is used to define dimension size
(shape[x])?
Currently, we assume the max size of each dimension is not going to exceed
2^31 in real applications. Hence the data type is `int32_t`

- what's the max size of total elements? Which data type is used to define element size (Prod(shape))?
We assume the total number of elements in a tensor can be larger than 2^32 in some applications
such as deep graph library. We use the data type `int64_t` to represent the total element
size. Currently due to performance regression in some operators (such as transpose), we used
a compiler flag to set this data type to `int32_t` by default. Once we have ways to mitigate
the performance regression, we will set the default data type to `int64_t`, which is part
of the effort in this project that Rohit proposed.

What is the plan in MKLDNN to support large tensors? We may want to coordinate the progress
since many operators are using MKLDNN implementation in CPU now.

Many Thanks,

Lin

On Sun, Apr 28, 2019 at 7:52 PM Lv, Tao A <tao.a.lv@intel.com> wrote:

> Thank you for bringing this topic to dev, Rohit.
>
> Regarding large tensor, can you articulate:
> - what's the max size of dimensionality? Which data type is used to 
> define dimensionality (ndims)?
> - what's the max size of each dimension? Which data type is used to 
> define dimension size (shape[x])?
> - what's the max size of total elements? Which data type is used to 
> define element size (Prod(shape))?
>
> For me, any of these three can be *large*.
>
> -----Original Message-----
> From: Srivastava, Rohit Kumar 
> [mailto:srivastava.141@buckeyemail.osu.edu]
> Sent: Saturday, April 27, 2019 7:33 AM
> To: dev@mxnet.incubator.apache.org
> Subject: [RFC] Support for creation of Large Tensors in MXNet
>
> Dear Community,
>
> Currently MXNet supports creation of Tensors containing up to 2^32 
> elements. However there are cases where tensors of size over 5 billion 
> is required
>
> We plan to support creation of large tensors on MXNet. A design 
> proposal is ready for review:
> https://cwiki.apache.org/confluence/display/MXNET/Large+Tensor+Support
>
> We will appreciate any help and feedbacks from the community.
>
> Thank you!
>
> Rohit
>
Mime
View raw message