adstraw commented on code in PR #12918:
URL: https://github.com/apache/tvm/pull/12918#discussion_r982528973
##########
src/runtime/hexagon/hexagon_device_api.h:
##########
@@ -153,6 +162,8 @@ class HexagonDeviceAPI final : public DeviceAPI {
return runtime_threads ? runtime_threads.get() : nullptr;
}
+ HexagonUserDMA* UserDMA() { return runtime_dma ? runtime_dma.get() :
nullptr; }
Review Comment:
I think the `CHECK` that I am recommending here is really a check that the
user has called `AcquireResources` which calls `make_unique` before calling
`UserDMA`. If indeed `make_unique` cannot return a nullptr then we are all
good. If it can return nullptr, then you should also `CHECK` after
`make_unique` in `AcquireResources`
--
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]