Preparing Input and Output Data for Model Inference
Call acl.rt.memcpy (synchronous mode) or acl.rt.memcpy_async (asynchronous mode) to implement data transfer from the host to the device through memory copy.
For model with multiple inputs and outputs, when adding aclDataBuffer to the aclmdlDataset, you are advised to obtain the names of the inputs and outputs first, and add aclDataBuffer in accordance with the corresponding index sequence.
In fixed-batch scenarios with batchSize >1, before creating data of type aclDataBuffer, acl.mdl.get_input_size_by_index needs to be called to obtain the required memory size using the index of the input.