sync_for_write - 3.0 简体中文

Vitis AI 用户指南 (UG1414)

Document ID
UG1414
Release Date
2023-02-24
Version
3.0 简体中文
写入高速缓存后,刷新用于写入的高速缓存。如果 get_location() 返回 DEVICE_ONLY 或 HOST_VIRT,则无需操作。

原型设计

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

参数

下表列出了 sync_for_write 函数实参。
表 1. sync_for_write Arguments
类型 名称 描述
uint64_t offset 起始偏移地址
size_t size 数据大小

返回

无。

用法

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