Migrate Memory API - 2019.2 English

Vitis Guidance Messaging (UG1315)

Document ID
UG1315
Release Date
2019-10-30
Version
2019.2 English

Description

This message indicates how often the migrate memory OpenCL API was called.

Explanation

The clEnqueueWriteBuffer and clEnqueueReadBuffer OpenCL buffers are very convenient to use. However, their actual transaction is triggered by a call to clEnqueueTask. Therefore, these functions can create unnecessary overhead as the write buffer does only start transferring data once the clEnqueueTask is initiated.

Alternatively, OpenCL provides the clEnqueueMigrateMemObjects API that can be utilized, which starts data transfer immediately given the bandwidth. Towards that end, it is strongly recommended to use just this interface for initiating the host code to accelerator data transfer.

Recommendation

It is best if only clEnqueueMigrateMemObjects is utilized. Otherwise, please take a careful look at the application timeline and host code synchronization. If considerable time is passing between the actual call to transfer the data, and it being executed is passing without the usage of the PCIe bandwidth, the code can potentially be improved by utilizing calls to clEnqueueMigrateMemObjects.