US 11,748,250 B2
Method and electronic device for data processing, and storage medium
Jianjun Li, Beijing (CN); Meng Yao, Beijing (CN); Zhenjiang Wang, Beijing (CN); and Yu Zhou, Beijing (CN)
Assigned to Beijing Horizon Robotics Technology Research and Development Co., Ltd., Beijing (CN)
Filed by Beijing Horizon Robotics Technology Research and Development Co., Ltd., Beijing (CN)
Filed on Nov. 29, 2021, as Appl. No. 17/536,475.
Claims priority of application No. 202011511725.9 (CN), filed on Dec. 18, 2020.
Prior Publication US 2022/0197786 A1, Jun. 23, 2022
Int. Cl. G06F 12/02 (2006.01); G06N 3/063 (2023.01)
CPC G06F 12/02 (2013.01) [G06N 3/063 (2013.01)] 14 Claims
OG exemplary drawing
 
1. A data processing method, including:
in response to determining that execution is performed at an operation layer of a neural network model, setting a first address range for cyclic addressing of a first buffer and a second address range for cyclic addressing of a second buffer based on a buffer allocation relationship which is pre-stored, wherein the first buffer is a buffer corresponding to input data for the operation layer, the second buffer is a buffer corresponding to an output result of the operation layer, the buffer allocation relationship includes a correspondence of feature data of the operation layer to a corresponding buffer and a corresponding cyclic addressing range in a corresponding buffer, wherein the corresponding buffer is one of the first buffer and the second buffer, wherein the feature data includes the input data and the output result, and the correspondence of feature data of the operation layer to the corresponding buffer and the corresponding cyclic addressing range in the corresponding buffer includes the correspondence of the input data for the operation layer to the first buffer and the first address range for cyclic addressing of the first buffer, and the correspondence of the output result of the operation layer to the second buffer and the second address range for cyclic addressing of the second buffer;
performing cyclic addressing in the first buffer based on the first address range for cyclic addressing, to read the input data for the operation layer;
executing an operation instruction corresponding to the operation layer to process the read input data, to obtain an output result; and
performing cyclic addressing in the second buffer based on the second address range for cyclic addressing, to write the output result into the second buffer,
wherein the method further includes:
allocating the first buffer and the second buffer for the input data and the output result of each feature data based on a size of each feature data of the operation layer, and determining the corresponding cyclic addressing range corresponding to each feature data in the corresponding buffer; and
determining a correspondence relationship among the input data and the output result of each feature data, and determining the corresponding buffer and the corresponding cyclic addressing range as the buffer allocation relationship corresponding to the operation layer,
wherein the determining the corresponding cyclic addressing range corresponding to each feature data in the corresponding buffer includes:
for each feature data, determining a start address for the input data and the output result of the feature data in the corresponding buffer, and determining a target data block obtained by splitting the feature data; and
determining the corresponding cyclic addressing range corresponding to the feature data in the corresponding buffer based on the start address for the feature data and a size of the target data block.