The invention relates to a mercuric
chloride NPU operator
automatic tuning method and
system based on fusion operator performance modeling, and the method comprises the steps: firstly constructing an end-to-end performance analysis model of a fusion operator for collaborative execution of a Cube core and a Vector core, and employing two
modes to accurately predict execution delays under different parameter configurations through dynamic discrimination of a calculation speed relation between double cores; on the basis, a
heuristic design space exploration
algorithm with minimization of data movement amount as guidance is provided, and the
algorithm is combined with the multilevel storage characteristic of the mercuric
chloride NPU, adopts a two-stage strategy of
block size optimization and buffer area allocation
collaboration, and automatically searches for optimal parameter configuration meeting on-
chip storage capacity constraints. According to the method, automatic performance adjustment and optimization of the fusion operator are realized, compared with traditional manual adjustment and optimization or
compiler default configuration, near-optimal configuration can be found within a few minutes, the average
performance prediction error is lower than 5%, the maximum performance speed-up ratio of part of operators can reach 1.46 times, and the efficiency of operator development and deployment on the mercuric
chloride NPU is remarkably improved.