1. A data processing method for a data processing device, the data processing device comprising: a program execution unit comprising a processor, and memories on a plurality of layers; an arithmetic control unit that receives a program and attribute values, the program including a plurality of subroutines for causing the processor to read a read block from the memory, perform data processing, and write a write block to the memory, the write block being a result of the data processing, the attribute values being set for the read block and the write block, respectively; and a memory access monitoring unit, the data processing method comprising: a step of executing, by the program execution unit, the program; a step of monitoring, by the memory access monitoring unit, a memory transfer of a data block or a sub-data block whose shape attribute value is a non-rectangle performed between the sub-routines and outputting memory access information related to the memory transfer to the arithmetic control unit; and a step, performed by the arithmetic control unit, of: calculating a shape attribute value by converting a read address or a write address of the data block based on the memory access information; correcting an attribute value by propagating the attribute value including at least the calculated shape attribute value in a direction opposite to a data flow or a process flow within the program; dividing, for each data block exchanged between the subroutines, the data block into sub-data blocks when the attribute value and performance/configuration information of the processor and the memory satisfy a predetermined condition; selecting a memory from which the sub-data blocks are read or to which the sub-data blocks are written from among the memories on the plurality of layers; and controlling memory access to the data block or the sub-data blocks and execution of a subroutine related to the data block performed by the processor.