Skip to content

Commit

Permalink
remove #if __HEXAGON_ARCH__ >= 68 guards per feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
adstraw committed Aug 25, 2022
1 parent f7f07d2 commit 5e06778
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
4 changes: 0 additions & 4 deletions src/runtime/hexagon/hexagon_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,8 @@ void hexagon_buffer_copy_across_regions(const BufferSet& dest, const BufferSet&

// Finally, do the memory copies.
for (const auto& copy : macro_copies) {
#if __HEXAGON_ARCH__ >= 68
int error_code = hexagon_user_dma_1d_sync(copy.dest, copy.src, copy.num_bytes);
CHECK_EQ(error_code, 0);
#else
memcpy(copy.dest, copy.src, copy.num_bytes);
#endif
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/runtime/hexagon/hexagon_device_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,8 @@ TVM_REGISTER_GLOBAL("device_api.hexagon.mem_copy").set_body([](TVMArgs args, TVM
void* src = args[1];
int size = args[2];

#if __HEXAGON_ARCH__ >= 68
int error_code = hexagon_user_dma_1d_sync(dst, src, size);
CHECK_EQ(error_code, 0);
#else
memcpy(dst, src, size);
#endif

*rv = static_cast<int32_t>(0);
});
Expand Down
3 changes: 2 additions & 1 deletion tests/cpp-runtime/hexagon/hexagon_user_dma_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ TEST_F(HexagonUserDMATest, async_dma_poll) {
}

// poll until at least 1 DMA is complete
while (HexagonUserDMA::Get().Poll() == 10) {};
while (HexagonUserDMA::Get().Poll() == 10) {
};

// verify
for (uint32_t i = 0; i < length; ++i) {
Expand Down

0 comments on commit 5e06778

Please sign in to comment.