Skip to content

Conversation

@n0thingNoob
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 17, 2026 00:26
Copy link
Contributor

Copilot AI left a 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.

Comment on lines 709 to 710
setConsumerSourceExact(consumer_operation, value_at_consumer, "$" + std::to_string(register_id));
return true;
Copy link

Copilot AI Jan 17, 2026

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.

Suggested change
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;

Copilot uses AI. Check for mistakes.
Comment on lines 1406 to 1407
DfgNodeMap nodes;
DfgEdgeList edges;
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.
DfgEdgeList edges;

DenseMap<Value, SmallVector<Operation *, 2>> reserve_to_ctrl_movs;
DenseMap<Value, SmallVector<Operation *, 2>> reserve_to_ctrl_movs;
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines 1414 to 1417
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;
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines 1431 to 1433
llvm::outs() << "[generate-code] DFG (SSA-based) emitted: nodes=" << nodes.size()
<< ", edges=" << edges.size()
<< " -> tmp-generated-dfg.dot, tmp-generated-dfg.yaml\n";
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.

// Groups instructions by index_per_ii.
// Groups instructions by index_per_ii.
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines 1485 to 1486
yaml_out << " - entry_id: \"entry0\"\n instructions:\n";
for (const auto &index_pair : index_groups) {
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.

// Groups instructions by index_per_ii.
// Groups instructions by index_per_ii.
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.
if (j > 0) asm_out << ", ";
asm_out << formatOperand(inst->dst_operands[j]);

for (const auto &index_pair : index_groups) {
Copy link

Copilot AI Jan 17, 2026

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.

Copilot uses AI. Check for mistakes.
@n0thingNoob n0thingNoob requested a review from tancheng January 17, 2026 13:45
@tancheng tancheng requested a review from BenkangPeng January 17, 2026 16:40
@n0thingNoob n0thingNoob merged commit 2a6fdfa into main Jan 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants