The invention is notably directed to a method of in-
memory processing, the aim of which is to perform matrix-vector calculations. The method relies on a device having a
crossbar array structure (15). The latter includes N input lines (152) and M output lines (153), which are interconnected at cross-points defining N×M cells (155), where N≥2 and M≥2. The cells include respective
memory systems, each designed to store K weights Wi,j,k, where K≥2. Thus, the
crossbar array structure includes N×M
memory systems, which are capable of storing K sets of N×M weights. In order to perform multiply-accumulate (MAC) operations, the method first enables N×M active weights for the N×M cells by selecting, for each of the
memory systems, a weight from its K weights and setting the selected weight as an active weight. Next, signals encoding a vector of N components are applied to the N input lines of the
crossbar array structure. This causes the latter to perform MAC operations based on the vector and the N×M active weights. Eventually, output signals obtained in output of the M output lines are read out to obtain corresponding values. This allows distinct sets of weights to be locally enabled at the crossbar array, which makes it possible to locally perform rotations of the weights and accordingly reduce the frequency of data exchanges with a memory unit. This, in turn, reduces idle times of the crossbar array structure. Thus, the proposed approach makes it possible to substantially reduce the frequency of data transfers, which results in speeding up computations. Plus, the weights may possibly be prefetched, while performing MAC operations in accordance with the currently active weights. Of particular
advantage is that the prefetching steps are at least partly hidden through pipelining. The invention is further directed to related devices, systems, and
computer program products.