[Hexagon] Add concept of DMA groups#14254
Merged
Lunderberg merged 14 commits intoapache:mainfrom Mar 20, 2023
Merged
Conversation
Co-authored-by: Noah Verke <nverke@octoml.ai> Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
Collaborator
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
Lunderberg
approved these changes
Mar 16, 2023
Contributor
Lunderberg
left a comment
There was a problem hiding this comment.
Looks good overall, just a collection of nitpicks.
| }); | ||
|
|
||
| TVM_REGISTER_GLOBAL("device_api.hexagon.dma_start_group") | ||
| .set_body([](TVMArgs args, TVMRetValue* rv) { |
Contributor
There was a problem hiding this comment.
Nit: When the input/output types are fixed, the .set_body_typed() method can be used to avoid needing manual argument wrangling.
.set_body_typed([](int queue_id) -> int32_t {
return HexagonDeviceAPI::Global()->UserDMA()->StartGroup(queue_id);
});
Contributor
Author
There was a problem hiding this comment.
Chose not to implement this for this iteration as it seems like we could / should redo the entire Hexagon Device API with this change.
LeiWang1999
added a commit
to LeiWang1999/tvm
that referenced
this pull request
Mar 24, 2023
This reverts commit c6c89c3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the concept of DMA group to align Hexagon User DMA with existing async copy solutions e.g. nVidia. Allows for the grouping of one or more DMA copies into a group and tracking the group with "in flight" counts created by InjectSoftwarePipeline pass. For now, this allows for the removal of
merge_async_commit_queue_scopewhich was a Hexagon specific workaround due to lack of support for grouping DMA copies. Later, in a future PR, this functionality may lead to the possibility of doing DMA copy on Hexagon over non-contiguous regions.