sync_for_write - 2.0 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2022-01-20
Version
2.0 English
Flush cache for writing after write. It is no-op in case get_location() returns DEVICE_ONLY or HOST_VIRT.

Prototype

void sync_for_write (uint64_t offset, size_t size) {};

Parameters

The following table lists the sync_for_write function arguments.
Table 1. sync_for_write Arguments
Type Name Description
uint64_t offset The start offset address
size_t size The data size

Returns

None.

Usage

for (auto& input : input_tensor_buffers) {
    input->sync_for_write(0, input->get_tensor()->get_data_size() /
                              input->get_tensor()->get_shape()[0]);
}