-
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
Changes from 7 commits
cbec2c4
913fdc2
5470c1a
553ae60
64e4268
b967b62
ea13bd7
f24530e
df976eb
557f2f6
54052bb
2e5d992
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -595,8 +595,8 @@ struct GenerateCodePass | |||||||||
| setUniqueDestination(pi, producer_direction.str()); | ||||||||||
| else if (!regs.empty()) | ||||||||||
| setUniqueDestination(pi, "$" + std::to_string(regs.back().regId)); | ||||||||||
| } | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| // Egress: on source tile at first_link_ts, move [$src_reg] -> [out_dir]. | ||||||||||
| void placeSrcEgress(const Topology &topology, int src_tile_id, int time_step, | ||||||||||
|
|
@@ -706,8 +706,8 @@ struct GenerateCodePass | |||||||||
| const bool should_rewire_to_register = | ||||||||||
| IsCtrl || (consumer_placement.time_step > deposit_time_step); | ||||||||||
| if (should_rewire_to_register) { | ||||||||||
| 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; | ||||||||||
|
||||||||||
| 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; |
Outdated
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.
Outdated
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.
Outdated
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.
Outdated
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.
Outdated
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.
Outdated
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.
Outdated
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.
Outdated
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.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // Keep the function name matching "kernel" so llvm-extract --rfunc=".*kernel.*" can find it. | ||
| extern "C" void kernel_axpy_int(int n, int a, const int *x, int *y) { | ||
| for (int i = 0; i < n; ++i) { | ||
| y[i] = a * x[i] + y[i]; | ||
| } | ||
| } | ||
|
|
||
| // Provide a tiny main so clang emits a complete TU; tests extract only the kernel anyway. | ||
| int main() { | ||
| const int N = 16; | ||
| static int x[N]; | ||
| static int y[N]; | ||
| kernel_axpy_int(N, /*a=*/3, x, y); | ||
| return 0; | ||
| } | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // A simple int GEMV: y = A*x + y. | ||
| // Use fixed small sizes to keep the generated IR stable-ish. | ||
| extern "C" void kernel_gemv_int(const int *A, const int *x, int *y) { | ||
| const int N = 4; | ||
| for (int i = 0; i < N; ++i) { | ||
| int acc = 0; | ||
| for (int j = 0; j < N; ++j) { | ||
| acc += A[i * N + j] * x[j]; | ||
| } | ||
| y[i] = acc; | ||
| } | ||
| } | ||
|
|
||
| int main() { | ||
| static int A[16]; | ||
| static int x[4]; | ||
| static int y[4]; | ||
| kernel_gemv_int(A, x, y); | ||
| return 0; | ||
| } | ||
|
|
||
|
|
Uh oh!
There was an error while loading. Please reload this page.