Computation in memory (CIM) architecture and dataflow supporting a depth-wise convolutional neural network (CNN)
AssigneeQUALCOMM Incorporated
InventorRen Li
Life of this patent
Estimating the term…
Abstract
Certain aspects provide an apparatus for signal processing in a neural network. The apparatus generally includes a first set of computation in memory (CIM) cells configured as a first kernel for a neural network computation, the first set of CIM cells comprising on one or more first columns and a first plurality of rows of a CIM array, and a second set of CIM cells configured as a second kernel for the neural network computation, the second set of CIM cells comprising on one or more second columns and a second plurality of rows of the CIM array. In some aspects, the one or more first columns are different than the one or more second columns, and the first plurality of rows are different than the second plurality of rows.
Claims11
An apparatus, comprising:
- a first set of computation in memory (CIM) cells configured as a first kernel for a neural network computation, the first set of CIM cells comprising one or more first columns and a first plurality of rows of a first CIM array;
- a second set of CIM cells configured as a second kernel for the neural network computation, the second set of CIM cells comprising one or more second columns and a second plurality of rows of the first CIM array, wherein:
- the one or more first columns are different than the one or more second columns,
- the first plurality of rows are different than the second plurality of rows,
- an entirety of the first kernel and an entirety of the second kernel are stored on different rows and columns, the first kernel and the second kernel being part of a same depthwise (DW) convolution filter for a multi-channel input, wherein a quantity of kernels of the DW convolution filter corresponds to a quantity of channels of the multi-channel input, and wherein the convolution of the multi-channel input with the DW convolution filter generates a feature map having the quantity of channels;
- a first analog-to-digital converter (ADC) coupled to the one or more first columns configured to store the first kernel;
- a second ADC coupled to the one or more second columns configured to store the second kernel, the first ADC being separate from the second ADC to perform at least partly parallel analog-to-digital conversions for the one or more first columns and the one or more second columns, respectively;
- a nonlinear activation circuit coupled to outputs of the first ADC and the second ADC, wherein the neural network computation comprises a depth-wise (DW) neural network computation based on the same filter;
- and
- a second CIM array configured as a third kernel for a pointwise (PW) neural network computation, the second CIM array for the PW neural network computation is separate from the first CIM array for the DW neural network computation, wherein input signals to the second CIM array are generated based on output signals from the first CIM array.
A method, comprising:
- loading, via one or more first columns, a first set of computation in memory (CIM) cells with a first plurality of weight parameters for a first kernel to perform a neural network computation, the first set of CIM cells comprising the one or more first columns and a first plurality of rows of a first CIM array;
- loading, via one or more second columns, a second set of CIM cells with a second plurality of weight parameters of a second kernel to perform the neural network computation, the second set of CIM cells comprising the one or more second columns and a second plurality of rows of the first CIM array, wherein the one or more first columns are different than the one or more second columns, and wherein the first plurality of rows are different than the second plurality of rows, wherein an entirety of the first kernel and an entirety of the second kernel are stored on different rows and columns, the first kernel and the second kernel being part of a same depthwise (DW) convolution filter for a multi-channel input, wherein a quantity of kernels of the DW convolution filter corresponds to a quantity of channels of the multi-channel input, and wherein the convolution of the multi-channel input with the DW convolution filter generates a feature map having the quantity of channels;
- performing the neural network computation by applying first activation inputs to the first plurality of rows and second activation inputs to the second plurality of rows;
- generating a first digital signal by converting a voltage at the one or more first columns storing the first kernel from an analog domain to a digital domain via a first analog-to-digital converter (ADC);
- generating a second digital signal by converting a voltage at the one or more second columns storing the second kernel from the analog domain to the digital domain via a second ADC, the first ADC being separate from the second ADC to generate the first digital signal and the second digital signal at least partly in parallel;
- performing a nonlinear activation operation based on the first digital signal and the second digital signal, wherein the neural network computation comprises a depth-wise (DW) neural network computation based on the same filter;
- loading a second CIM array with a third plurality of weights for a third kernel to perform a pointwise (PW) neural network computation, wherein the second CIM array for the PW neural network computation is separate from the first CIM array for the DW neural network computation;
- and
- generating input signals to the second CIM array based on output signals from the DW neural network computation.
A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors of a processing system, cause the processing system to perform a method, the method comprising:
- loading, via one or more first columns, a first set of computation in memory (CIM) cells with a first plurality of weight parameters for a first kernel to perform a neural network computation, the first set of CIM cells comprising the one or more first columns and a first plurality of rows of a first CIM array;
- loading, via one or more second columns, a second set of CIM cells with a second plurality of weight parameters of a second kernel to perform the neural network computation, the second set of CIM cells comprising the one or more second columns and a second plurality of rows of the first CIM array, wherein the one or more first columns are different than the one or more second columns, and wherein the first plurality of rows are different than the second plurality of rows, wherein an entirety of the first kernel and an entirety of the second kernel are stored on different rows and columns, the first kernel and the second kernel being part of a same depthwise (DW) convolution filter for a multi-channel input, wherein a quantity of kernels of the DW convolution filter corresponds to a quantity of channels of the multi-channel input, and wherein the convolution of the multi-channel input with the DW convolution filter generates a feature map having the quantity of channels;
- performing the neural network computation by applying first activation inputs to the first plurality of rows and second activation inputs to the second plurality of rows;
- generating a first digital signal by converting a voltage at the one or more first columns configured to store the first kernel from an analog domain to a digital domain via a first analog-to-digital converter (ADC);
- generating a second digital signal by converting a voltage at the one or more second columns configured to store the second kernel from the analog domain to the digital domain via a second ADC, the first ADC being separate from the second ADC to generate the first digital signal and the second digital signal at least partly in parallel;
- performing a nonlinear activation operation based on the first digital signal and the second digital signal, wherein the neural network computation comprises a depth-wise (DW) neural network computation based on the same filter;
- loading a second CIM array with a third plurality of weights for a third kernel to perform a pointwise (PW) neural network computation, wherein the second CIM array for the PW neural network computation is separate from the first CIM array for the DW neural network computation;
- and
- generating input signals to the second CIM array based on output signals from the DW neural network computation.
Dependencies are inferred from the claim text.