[VTA] Performance optimize, remove unnecessary contigious memory use. (#4246)
authorHua Jiang <huaj@xilinx.com>
Sat, 2 Nov 2019 03:29:54 +0000 (20:29 -0700)
committerThierry Moreau <moreau@uw.edu>
Sat, 2 Nov 2019 03:29:54 +0000 (20:29 -0700)
commit008aa838139bcd8e66c680f14a944f7af274a33d
tree8f2f73e0419ee26999474286b007da97eeb24df0
parente9039d04522a003f5d9f8d7dec3d21cfddad3531
[VTA] Performance optimize, remove unnecessary contigious memory use. (#4246)

* [VTA] Performance optimize, remove unnecessary contigious memory use.

Issue:
Uop maintain a cache vector to copy uop data into contigious DRAM memory for
FPGA/Simulator use, but this cache vector not get clear after FPGA/Simulator
core run, in Resnet18 case, if we printf the cache size in UopQueue::ReadBarrier
function, we can saw such cache size keep increase, this would cause
no use data copy and unnecessary contigous DRAM memory malloc.

Analysis:
This issue caused by not clear cache_ vector when do
uop_queue_.Reset().

Solution:
Override BaseQueue Reset function in UopQueue and add cache_ clear
logic.

* address review comments, remove spacing.
vta/src/runtime.cc