janetsc commented on code in PR #13381:
URL: https://github.com/apache/tvm/pull/13381#discussion_r1023108215
##########
src/runtime/hexagon/hexagon_buffer.cc:
##########
@@ -237,8 +236,15 @@ void hexagon_buffer_copy_across_regions(const BufferSet&
dest, const BufferSet&
// Finally, do the memory copies.
for (const auto& copy : macro_copies) {
- int error_code = hexagon_user_dma_1d_sync(copy.dest, copy.src,
copy.num_bytes);
- CHECK_EQ(error_code, 0);
+ qurt_mem_cache_clean(reinterpret_cast<qurt_addr_t>(copy.dest),
copy.num_bytes,
+ QURT_MEM_CACHE_INVALIDATE, QURT_MEM_DCACHE);
+ qurt_mem_cache_clean(reinterpret_cast<qurt_addr_t>(copy.src),
copy.num_bytes,
+ QURT_MEM_CACHE_INVALIDATE, QURT_MEM_DCACHE);
+ memcpy(copy.dest, copy.src, copy.num_bytes);
+ qurt_mem_cache_clean(reinterpret_cast<qurt_addr_t>(copy.dest),
copy.num_bytes,
Review Comment:
Based on our discussion just now, I understand better. I agree a TODO here
is good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]