Word based channels last ordering in memory
A memory device having a plurality of groups of words is provided. Each group of the plurality of groups of words are stored in a contiguous section of a memory and each group of the plurality of groups of words includes a plurality of words. The plurality of words each have a plurality of elements with a same set of index values for a first dimension of a tensor and a same set of index vales for a second dimension of a tensor. The plurality of words have a different index value for a third dimension of the tensor.
1 . A computing device comprising:
a memory; and
a processor configured to:
perform a plurality of memory accesses of a plurality of groups of words,
wherein each group of the plurality of groups of words are stored in a contiguous section of the memory,
wherein each group of the plurality of groups of words comprises a plurality of words, the plurality of words each comprising a plurality of elements having a set of sequential index values for a first dimension of a tensor, a same index value for a second dimension of the tensor and a same index value for a third dimension of the tensor,
wherein each of the plurality of words in each group of the plurality of groups of words has the set of index values for the first dimension, the same index value for the second dimension, and a different index value for the third dimension of the tensor, and
wherein the first dimension and the second dimension are spatial dimensions, and the third dimension is a channel dimension; and
execute a layer of a neural network model using the plurality of memory accesses.
2 . The computing device of claim 1 , wherein the plurality of words comprises a first word having a first subset of the plurality of elements, the first subset of the plurality of elements each having: a first set of sequential index values along the first dimension of the tensor, a first single index value for the second dimension of the tensor, and a second single index value for the third dimension of the tensor.
3 . The computing device of claim 2 , wherein the plurality of words comprises a second word having a second subset of the plurality of elements, the second subset of the plurality of elements each having: the first set of sequential index values along the first dimension of the tensor, the first single index value for the second dimension of the tensor, and a third single index value for the third dimension of the tensor that is different than the second single index value.
4 . The computing device of claim 1 , wherein the first dimension is a column dimension and the second dimension is a row dimension.
5 . The computing device of claim 1 , wherein the processor is further configured to execute a convolutional neural network model to perform a depth-wise convolution operation using a plurality of filters.
6 . The computing device of claim 1 , wherein the processor is further configured to execute a convolutional neural network model to perform a pointwise convolution stage using a filter.
7 . The computing device of claim 1 , wherein each group of the plurality of groups has a same number of words as a number of index values along the third dimension.
8 . A memory device comprising:
a plurality of groups of words, wherein each group of the plurality of groups of words are stored in a contiguous section of a memory,
wherein each group of the plurality of groups of words comprises a plurality of words, the plurality of words each comprising a plurality of elements having a set of sequential index values for a first dimension of a tensor, a same index value for a second dimension of the tensor and a same index value for a third dimension of the tensor,
wherein each of the plurality of words in each group of the plurality of groups of words has the set of index values for the first dimension, the same index value for the second dimension, and a different index value for the third dimension of the tensor, and
wherein the first dimension and the second dimension are spatial dimensions, and the third dimension is a channel dimension.
9 . The memory device of claim 8 , wherein the plurality of words comprises a first word having a first subset of the plurality of elements, the first subset of the plurality of elements each having: a first set of sequential index values along the first dimension of the tensor, a first single index value for the second dimension of the tensor, and a second single index value for the third dimension of the tensor.
10 . The memory device of claim 9 , wherein the plurality of words comprises a second word having a second subset of the plurality of elements, the second subset of the plurality of elements each having: the first set of sequential index values along the first dimension of the tensor, the first single index value for the second dimension of the tensor, and a third single index value for the third dimension of the tensor that is different than the second single index value.
11 . The memory of claim 8 , wherein the first dimension is a column dimension, the second dimension is a row dimension, and the third dimension is a channel dimension.
12 . The memory of claim 8 , wherein each group of the plurality of groups has a same number of words as a number of index values along the third dimension.
13 . A method comprising:
performing a plurality of memory accesses of a plurality of groups of words,
wherein each group of the plurality of groups of words are stored in a contiguous section of memory,
wherein each group of the plurality of groups of words comprises a plurality of words, the plurality of words each comprising a plurality of elements having a same set of sequential index values for a first dimension of a tensor, a same index value for a second dimension of the tensor and a same index value for a third dimension of the tensor,
wherein each of the plurality of words in each group of the plurality of groups of words has the set of index values for the first dimension, the same index value for the second dimension, and a different index value for the third dimension of the tensor,
wherein the first dimension and the second dimension are spatial dimensions, and the third dimension is a channel dimension; and
executing a layer of a neural network model using the plurality of memory accesses.
14 . The method of claim 13 , wherein each group has a same number of words as a number of index values along the third dimension.
15 . The method of claim 13 , further comprising:
executing a depth-wise convolution operation on the plurality of words.
16 . The method of claim 13 , further comprising:
executing a point-wise convolution operation on the plurality of words.