[experimental] Add lowering for aiex.memcpy inside runtime_sequence for npu#16
Draft
[experimental] Add lowering for aiex.memcpy inside runtime_sequence for npu#16
Conversation
Comment on lines
+44
to
+45
| std::cout << "Loading xclbin: " << vm["xclbin"].as<std::string>() | ||
| << "\n"; |
There was a problem hiding this comment.
[clang-format] reported by reviewdog 🐶
Suggested change
| std::cout << "Loading xclbin: " << vm["xclbin"].as<std::string>() | |
| << "\n"; | |
| std::cout << "Loading xclbin: " << vm["xclbin"].as<std::string>() << "\n"; |
Comment on lines
+49
to
+50
| std::cout << "Kernel opcode: " << vm["kernel"].as<std::string>() | ||
| << "\n"; |
There was a problem hiding this comment.
[clang-format] reported by reviewdog 🐶
Suggested change
| std::cout << "Kernel opcode: " << vm["kernel"].as<std::string>() | |
| << "\n"; | |
| std::cout << "Kernel opcode: " << vm["kernel"].as<std::string>() << "\n"; |
| std::vector<uint32_t> srcVec; | ||
| srcVec.reserve(IN_SIZE); | ||
| for (int i = 0; i < IN_SIZE; i++) | ||
| srcVec.push_back(static_cast<uint32_t>(i+24)); |
There was a problem hiding this comment.
[clang-format] reported by reviewdog 🐶
Suggested change
| srcVec.push_back(static_cast<uint32_t>(i+24)); | |
| srcVec.push_back(static_cast<uint32_t>(i + 24)); |
| std::cout << "\nPASS!\n\n"; | ||
| return 0; | ||
| } | ||
| std::cout << "\nfailed. (errors: " << errors << "/" << OUT_SIZE << ")" << "\n\n"; |
There was a problem hiding this comment.
[clang-format] reported by reviewdog 🐶
Suggested change
| std::cout << "\nfailed. (errors: " << errors << "/" << OUT_SIZE << ")" << "\n\n"; | |
| std::cout << "\nfailed. (errors: " << errors << "/" << OUT_SIZE << ")" | |
| << "\n\n"; |
- Add npu.writebd lowering for tile DMAs in AIEDmaToNpu - Add tile_dmas integration tests (blockwrite_using_locks, writebd, writebd_tokens) - Add test coverage for tile DMA buffer descriptor format differences
- Extensive modifications to aie-lower-memcpy to support runtime BD configuration: - Emit npu.writebd and npu.push_queue for tile-side BD configuration - Use buffer address attributes for physical offset calculation - Add npu.dma_wait after shim DMAs that issue tokens - Use channel 0 for both S2MM and MM2S directions - Add test: npu-xrt/add_one_runtime_memcpy with aie-opt preprocessing - Modify AIEDialect to expose buffer addresses
cf09737 to
0eb960a
Compare
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.
This branch uses the existing token and memcpy operations from the aiex dialect inside runtime sequences to program dmas.
The test looks like:
which lowers to:
The pass is proof-of-concept quality.