-
Notifications
You must be signed in to change notification settings - Fork 15
Testbench add zeonica_testbench submodule and some other tests #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Pull request overview
This PR adds the Zeonica_Testbench submodule and introduces several new end-to-end kernel tests (spmv, gemv, axpy) along with a sync script to propagate generated artifacts to the testbench repository.
Changes:
- Added Zeonica_Testbench as a git submodule with sync tooling
- Added new e2e test kernels: spmv, gemv, and axpy
- Fixed indentation issues in GenerateCodePass.cpp
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/sync_e2e_outputs_to_zeonica_testbench.sh | Script to sync e2e outputs to testbench submodule |
| test/e2e/spmv/spmv_kernel.mlir | E2E test for sparse matrix-vector multiplication kernel |
| test/e2e/gemv/gemv_kernel.mlir | E2E test for general matrix-vector multiplication kernel |
| test/e2e/axpy/axpy_kernel.mlir | E2E test for AXPY-like kernel |
| test/benchmark/gemv/gemv_int.cpp | Integer GEMV kernel implementation |
| test/benchmark/axpy/axpy_int.cpp | Integer AXPY kernel implementation |
| test/benchmark/Zeonica_Testbench | Submodule commit reference |
| lib/NeuraDialect/Transforms/GenerateCodePass.cpp | Fixed indentation and brace placement issues |
| README.md | Documentation for syncing outputs to testbench |
| .gitmodules | Added Zeonica_Testbench submodule configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| setConsumerSourceExact(consumer_operation, value_at_consumer, "$" + std::to_string(register_id)); | ||
| return true; |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: these lines are part of the conditional block starting at line 708 but are not properly indented. They should be indented one level deeper to reflect their scope within the if statement.
| setConsumerSourceExact(consumer_operation, value_at_consumer, "$" + std::to_string(register_id)); | |
| return true; | |
| setConsumerSourceExact(consumer_operation, value_at_consumer, "$" + std::to_string(register_id)); | |
| return true; |
| DfgNodeMap nodes; | ||
| DfgEdgeList edges; |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: these variable declarations should be indented one level deeper as they are within the run() method body, not at class level.
| DfgEdgeList edges; | ||
|
|
||
| DenseMap<Value, SmallVector<Operation *, 2>> reserve_to_ctrl_movs; | ||
| DenseMap<Value, SmallVector<Operation *, 2>> reserve_to_ctrl_movs; |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: this variable declaration should be indented one level deeper to align with the other local variables in the run() method.
| std::vector<std::pair<int,int>> original_edges = edges; | ||
| edges.clear(); | ||
| llvm::SmallDenseSet<std::pair<int,int>, 32> edges_to_skip; | ||
| std::vector<HopRewriteInfo> hop_rewrites; |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: these variable declarations should be indented one level deeper as they are local variables within the run() method body.
| llvm::outs() << "[generate-code] DFG (SSA-based) emitted: nodes=" << nodes.size() | ||
| << ", edges=" << edges.size() | ||
| << " -> tmp-generated-dfg.dot, tmp-generated-dfg.yaml\n"; |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: this logging statement should be indented one level deeper as it is within the run() method body, not at class level.
|
|
||
| // Groups instructions by index_per_ii. | ||
| // Groups instructions by index_per_ii. |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: this comment and the following code block should be indented one level deeper to reflect being within the method body.
| yaml_out << " - entry_id: \"entry0\"\n instructions:\n"; | ||
| for (const auto &index_pair : index_groups) { |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: these lines should be indented one level deeper as they are within the method body, not at class level.
|
|
||
| // Groups instructions by index_per_ii. | ||
| // Groups instructions by index_per_ii. |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: this comment and the following code block should be indented one level deeper to reflect being within the method body.
| if (j > 0) asm_out << ", "; | ||
| asm_out << formatOperand(inst->dst_operands[j]); | ||
|
|
||
| for (const auto &index_pair : index_groups) { |
Copilot
AI
Jan 17, 2026
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.
Incorrect indentation: this loop and its body should be indented one level deeper as they are within the method body, not at class level.
No description provided.