areusch commented on a change in pull request #10311:
URL: https://github.com/apache/tvm/pull/10311#discussion_r814167425
##########
File path: src/runtime/hexagon/hexagon/hexagon_device_api_v2.cc
##########
@@ -82,7 +82,11 @@ void* HexagonDeviceAPIv2::AllocDataSpace(Device dev, size_t
nbytes, size_t align
}
void HexagonDeviceAPIv2::FreeDataSpace(Device dev, void* ptr) {
- CHECK(TVMDeviceExtType(dev.device_type) == kDLHexagon);
+ bool device = false;
+ if ((TVMDeviceExtType(dev.device_type) == kDLHexagon) ||
(DLDeviceType(dev.device_type) == kDLCPU)) {
Review comment:
on AOT we currently require device_type == kDLCPU. this hack seems
consistent with the previous approach to patch the CPU device with Hexagon. we
could add a comment here to explain.
imo we should take up the issue of what device type to actually use here
when we address the compilation path for Hexagon code.
--
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]