This disclosure provides a method, apparatus, electronic device, and storage medium for implementing matrix operations on a multi-core processor. The method is applied to a matrix operation apparatus, which includes n processor cores, a cache
queue, an arbitrator, and m matrix operation units, where n ≥ 2, 1 ≤ m < n, and the m matrix operation units are located outside the n processor cores and shared by them. The method includes: generating multiple matrix operation instructions through the n processor cores and caching them in the cache
queue; retrieving multiple matrix operation instructions from the cache
queue through the arbitrator, and sending a first matrix operation instruction to a first matrix operation unit among the m matrix operation units; and executing the operation through the first matrix operation unit. In this disclosure, each processor core can freely execute matrix operations, ensuring user-friendly and unified
software programming. Furthermore, the sharing and dynamic allocation of matrix operation units improves the execution efficiency of matrix operations in a multi-core processor
system.