Dynamic memory mapping for neural networks
AssigneeSamsung Electronics Co., Ltd.
InventorsChenchi Luo, Hyejung Kim, Seok-Jun Lee, David Liu, Michael Polley
Life of this patent
Estimating the term…
Abstract
A method to map a plurality of feature maps of a neural network onto a memory hierarchy includes mapping a first feature map of the plurality of feature maps to a memory in a memory hierarchy having available memory space and providing quickest access to the first feature map. The method also includes, when the first feature map expires, removing the first feature map from the memory used to store the first feature map.
Claims25
A method comprising:
- mapping a plurality of feature maps of a neural network onto a memory hierarchy, including:
- mapping a first feature map of the plurality of feature maps to a memory in the memory hierarchy having available memory space and providing quickest access to the first feature map;
- generating a second feature map of the plurality of feature maps from the first feature map;
- removing, in response to a mapping of the second feature map, the first feature map from the memory;
- and
- unallocating the memory used to store the first feature map;
- determining, based on the mapping of the plurality of feature maps, that one or more layers of the neural network output a feature map that could not be mapped to an on-chip memory in the memory hierarchy;
- and
- reducing, based on the determination, output channels for at least one of the one or more layers of the neural network.
An electronic device comprising:
- at least one memory in a memory hierarchy;
- and
- at least one processor coupled to the at least one memory, the at least one processor configured to:
- map a plurality of feature maps of a neural network onto the memory hierarchy, wherein, to map the plurality of feature maps onto the memory hierarchy, the at least one processor is configured to:
- map a first feature map of the plurality of feature maps to a memory in the memory hierarchy having available memory space and providing quickest access to the first feature map;
- generate a second feature map of the plurality of feature maps from the first feature map;
- remove, in response to a mapping of the second feature map, the first feature map from the memory;
- and
- unallocate the memory used to store the first feature map;
- determine, based on the mapping of the plurality of feature maps, that one or more layers of the neural network output a feature map that could not be mapped to an on-chip memory in the memory hierarchy;
- and
- reduce, based on the determination, output channels for at least one of the one or more layers of the neural network.
A non-transitory computer readable medium embodying a computer program, the computer program comprising computer readable program code that, when executed by at least one processor, causes the at least one processor to:
- map a plurality of feature maps of a neural network onto a memory hierarchy, wherein the computer readable program code that causes the at least one processor to map the plurality of feature maps onto the memory hierarchy comprises computer readable program code that causes the at least one processor to:
- map a first feature map of the plurality of feature maps to a memory in the memory hierarchy having available memory space and providing quickest access to the first feature map;
- generate a second feature map of the plurality of feature maps from the first feature map;
- remove, in response to a mapping of the second feature map, the first feature map from the memory;
- and
- unallocate the memory used to store the first feature map;
- determine, based on the mapping of the plurality of feature maps, that one or more layers of the neural network output a feature map that could not be mapped to an on-chip memory in the memory hierarchy;
- and
- reduce, based on the determination, output channels for at least one of the one or more layers of the neural network.
An electronic device comprising:
- memory including on-chip memory and off-chip memory;
- and
- at least one processor coupled to the memory, the at least one processor configured to:
- write data from a neural network input to the on-chip memory;
- provide the data in the on-chip memory to a fused layer of a neural network, wherein the fused layer includes two or more layers that are combined into one atomic layer to reduce data movement between the on-chip memory and the off-chip memory, wherein the two or more layers combined into the fused layer include (i) a merged convolution and batch normalization layer and (ii) a pooling layer, wherein the merged convolution and batch normalization layer includes one or more batch normalization parameters of a batch normalization equation absorbed into a convolutional equation to create a merged convolution and batch normalization operation;
- perform one or more fused layer operations on the data, the one or more fused layer operations including the merged convolution and batch normalization operation;
- generate an output from the one or more fused layer operations;
- and
- write the output to the off-chip memory.
Dependencies are inferred from the claim text.