The invention provides an end-to-end compiling method of a coarse-grained
reconfigurable array based on hierarchical data streams, and relates to the technical field of automatic compilation, and the method comprises the following steps: converting a to-be-compiled
programming code into an optimized intermediate representation of an MLIR, converting the optimized intermediate representation into a front-end
data stream of a plurality of hierarchical data streams, converting the front-end
data stream into a CGRA rear-end
data stream according to a preset unloading strategy, and storing the CGRA rear-end data
stream in the optimized intermediate representation; and unloading the Kernel kernel code to obtain a target kernel code so as to generate CGRA mapping configuration information of the kernel code
data flow diagram. And finally, constructing and obtaining an
executable file in combination with a host
object file generated by the host side code. Through the method and the device, the problems that during CGRA end-to-end compiling, the accelerated kernel code is labeled through manual proma labeling, so that code editing is time-consuming and labor-consuming,
data transmission and link of a host side code and a CGRA kernel side code are ignored, and the CGRA acceleration performance cannot be effectively exerted are solved.