-
Notifications
You must be signed in to change notification settings - Fork 15
Testbench update axpy kernel #248
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
base: main
Are you sure you want to change the base?
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 simplifies the axpy kernel test by moving constant values (N=16, A=3) from function parameters into the kernel itself. This change reduces the complexity of the test setup by eliminating the need to handle parameter values through YAML output files.
Changes:
- Added a new bash script to sync e2e test outputs to the Zeonica_Testbench submodule
- Modified the axpy kernel to use hardcoded constants instead of parameters, reducing the function signature from 4 parameters to 2
- Updated the MLIR test expectations to reflect the new kernel signature and simplified compiled output (II reduced from 6 to 5)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/sync_e2e_outputs_to_zeonica_testbench.sh | New utility script to synchronize e2e test outputs (DFG, YAML, ASM files) to the Zeonica_Testbench submodule |
| test/benchmark/axpy/axpy_int.cpp | Simplified kernel signature by moving N and A constants into the function body |
| test/e2e/axpy/axpy_kernel.mlir | Updated test expectations to match new kernel signature with 2 parameters instead of 4, reflecting improved compilation metrics |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/benchmark/axpy/axpy_int.cpp
Outdated
| for (int i = 0; i < n; ++i) { | ||
| y[i] = a * x[i] + y[i]; | ||
| extern "C" void kernel_axpy_int(const int *x, int *y) { | ||
| constexpr int N = 16; |
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.
Can we make it a global variable outside the kernel_axpy_int()? would that also work?
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.
Yes, I have updated a new version of it.
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.
Can you add comment to this file? Not sure what is this file for.
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.
Ok
The original kernel emits arguments via the YAML output. To simplify testing, I slightly modified it by moving the constant values into the kernel.