adstraw commented on code in PR #12411:
URL: https://github.com/apache/tvm/pull/12411#discussion_r954407081
##########
src/runtime/hexagon/hexagon_user_dma.cc:
##########
@@ -82,12 +95,13 @@ int HexagonUserDMA::Copy(void* dst, void* src, uint32_t
length) {
dmstart(dma_desc);
first_dma_ = false;
} else {
- // `dmlink` descriptor to tail
- dmlink(dma_descriptors_.back(), dma_desc);
+ // `dmlink` descriptor to tail descriptor
+ void* tail = GetDescriptorAddr(id_next_dma_desc_ - 1);
+ dmlink(tail, dma_desc);
}
- // set descriptor as new tail
- dma_descriptors_.push_back(dma_desc);
+ // update the ID of the next DMA descriptor
+ id_next_dma_desc_++;
Review Comment:
Added new RingBuffer class along with testing.
--
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]