-
Notifications
You must be signed in to change notification settings - Fork 0
Freeing the commands and the command chain created during dispatch #29
Conversation
I can't comment since it isn't a touched line but don't you need to free the
also in this file is the
|
We go through all of the cmd_handles and free all of them here: https://github.com/nod-ai/ROCR-Runtime/pull/29/files#diff-d794c4f5b69c550f71f08837a96b68bb2dad1cd8750f1c41623a92d4dcef9a7eR444-R447. Are there some commands that we are missing? Good point on the queue will add that to this PR as well. |
sorry I should've been more specific - shouldn't the buffers themselves be |
Wow you are good! Didn't realize you had a PR that had this :). Alright I am both unmapping and closing as that is consistent with how the XRT shim is dealing with cmds (unmapping: https://github.com/amd/xdna-driver/blob/867e2f9f5f21596ec642e9ca5321de7a0863c14d/src/shim/bo.cpp#L59-L62 and closing: https://github.com/amd/xdna-driver/blob/867e2f9f5f21596ec642e9ca5321de7a0863c14d/src/shim/bo.cpp#L23-L27) if we learn that this is redundant happy to remove closing or unmapping. Also added the queue ring buf deallocation via the system deallocator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - in my local testing of basically the same changes this made most (all?) of the kernel leaks go away.
* Freeing the commands and the command chain created during dispatch * Unmaping and closing cmd BOs as well as freeing the queue ring buffer
* Freeing the commands and the command chain created during dispatch * Unmaping and closing cmd BOs as well as freeing the queue ring buffer
* Freeing the commands and the command chain created during dispatch * Unmaping and closing cmd BOs as well as freeing the queue ring buffer
No description provided.