You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/09/27 23:13:52 UTC

[GitHub] [tvm] adstraw commented on a diff in pull request #12918: [Hexagon] [runtime] Add user DMA to device API resource management

adstraw commented on code in PR #12918:
URL: https://github.com/apache/tvm/pull/12918#discussion_r981800296


##########
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:
   Either we need to `CHECK` that runtime_dma is not null here or in the calling scope.  We are doing neither.  All callers of `UserDMA()` immediately dereference it.  My thought would be to `CHECK` non null here.
   
   You might apply this change to the `ThreadManager()` - I believe it has the same issue.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org