Add check for non-contiguous memory access when lowering to async dma…#13613
Merged
masahi merged 4 commits intoapache:mainfrom Dec 16, 2022
Merged
Add check for non-contiguous memory access when lowering to async dma…#13613masahi merged 4 commits intoapache:mainfrom
masahi merged 4 commits intoapache:mainfrom
Conversation
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 |
adstraw
approved these changes
Dec 15, 2022
| auto store_iter_map = DetectIterMap(store_index, input_iters, 1, arith::IterMapLevel::NoCheck, | ||
| &analyzer, false); | ||
| if (!store_iter_map->errors.empty()) { | ||
| LOG(FATAL) << "Unable to lower async dma for non contiguous memory access with index: " |
Contributor
There was a problem hiding this comment.
Nit: You might differentiate the error message by including something text indicating that the "buffer store" contained the non contiguous access.
| auto load_iter_map = | ||
| DetectIterMap(load_index, input_iters, 1, arith::IterMapLevel::NoCheck, &analyzer, false); | ||
| if (!load_iter_map->errors.empty()) { | ||
| LOG(FATAL) << "Unable to lower async dma for non contiguous memory access with index: " |
Contributor
There was a problem hiding this comment.
Nit: Same as above. Add text indicating "buffer load" contained non contiguous access.
Member
What support is being planed? 2D DMA or breaking up into contiguous copies? |
Contributor
Author
|
We are still discussing the pros and cons of the potential options but the possible solutions are.
|
fzi-peccia
pushed a commit
to fzi-peccia/tvm
that referenced
this pull request
Mar 27, 2023
apache#13613) * Add check for non-contiguous memory access when lowering to async dma copies. * lint * lint and nits * lint
mikeseven
pushed a commit
to mikeseven/tvm
that referenced
this pull request
Sep 27, 2023
apache#13613) * Add check for non-contiguous memory access when lowering to async dma copies. * lint * lint and nits * lint
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.
… copies.
Currently we do not support non contiguous memory copies for async dma so this adds a check to error out in the case that either load or store is non contiguous. Unfortunately if we do not throw an error in this case then we get inaccurate outputs. Added a test to verify that we are indeed throwing an error in this case that should be removed once support is added.
@adstraw @masahi