-
Notifications
You must be signed in to change notification settings - Fork 1
Fixed non-hardware-executed tests for WSE-3 #63
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
Open
jonathan-pepino-schaefer
wants to merge
6
commits into
spcl:main
Choose a base branch
from
hlrs-fcg:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b96df65
Fixed test non-hw-executed cases to support wse3
jonathan-pepino-schaefer b90ac07
Fixed test non-hw-executed cases to support wse3
jonathan-pepino-schaefer 9842990
Merge pull request #1 from hlrs-fcg/bugfix/fix_taskid_recycling_wse3
jonathan-pepino-schaefer a57ec9a
reverted bad style formatting
jonathan-pepino-schaefer f7c6c59
Moved from env variable to constants.ARCH
jonathan-pepino-schaefer c379533
Applied style formatting
jonathan-pepino-schaefer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
111 changes: 111 additions & 0 deletions
111
tests/csl_runtime/samples/task_recycling_merge_wse3.sptl
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| kernel @task_recycling_merge<>(stream<f32, 22>[1, 1] readonly input, stream<f32, 1>[1, 1] writeonly output) { | ||
| place u16 i, u16 j in [0:1, 0:1] { | ||
| f32[22] buf | ||
| f32 v0 | ||
| f32 v1 | ||
| f32 v2 | ||
| f32 v3 | ||
| f32 v4 | ||
| f32 v5 | ||
| f32 v6 | ||
| f32 v7 | ||
| f32 v8 | ||
| f32 v9 | ||
| f32 v10 | ||
| f32 v11 | ||
| f32 v12 | ||
| f32 v13 | ||
| f32 v14 | ||
| f32 v15 | ||
| f32 v16 | ||
| f32 v17 | ||
| f32 v18 | ||
| f32 left_val | ||
| f32 right_val | ||
| f32 output_val | ||
| f32[1] out_buf | ||
| } | ||
|
|
||
| dataflow u16 i, u16 j in [0:1, 0:1] { | ||
| } | ||
|
|
||
| compute u16 i, u16 j in [0:1, 0:1] { | ||
| await receive(buf, input[i, j]) | ||
|
|
||
| completion s0 = async { | ||
| v0 = buf[0] | ||
| } | ||
| completion s1 = async { | ||
| v1 = v0 * 0.0 + buf[1] | ||
| } | ||
| completion s2 = async { | ||
| v2 = v1 * 0.0 + buf[2] | ||
| } | ||
| completion s3 = async { | ||
| v3 = v2 * 0.0 + buf[3] | ||
| } | ||
| completion s4 = async { | ||
| v4 = v3 * 0.0 + buf[4] | ||
| } | ||
| completion s5 = async { | ||
| v5 = v4 * 0.0 + buf[5] | ||
| } | ||
| completion s6 = async { | ||
| v6 = v5 * 0.0 + buf[6] | ||
| } | ||
| completion s7 = async { | ||
| v7 = v6 * 0.0 + buf[7] | ||
| } | ||
| completion s8 = async { | ||
| v8 = v7 * 0.0 + buf[8] | ||
| } | ||
| completion s9 = async { | ||
| v9 = v8 * 0.0 + buf[9] | ||
| } | ||
| completion s10 = async { | ||
| v10 = v9 * 0.0 + buf[10] | ||
| } | ||
| completion s11 = async { | ||
| v11 = v10 * 0.0 + buf[11] | ||
| } | ||
|
|
||
| completion s12 = async { | ||
| v12 = v11 * 0.0 + buf[12] | ||
| } | ||
| completion s13 = async { | ||
| v13 = v12 * 0.0 + buf[13] | ||
| } | ||
| completion s14 = async { | ||
| v14 = v13 * 0.0 + buf[14] | ||
| } | ||
| completion s15 = async { | ||
| v15 = v14 * 0.0 + buf[15] | ||
| } | ||
| completion s16 = async { | ||
| v16 = v15 * 0.0 + buf[16] | ||
| } | ||
| completion s17 = async { | ||
| v17 = v16 * 0.0 + buf[17] | ||
| } | ||
| completion s18 = async { | ||
| v18 = v17 * 0.0 + buf[18] | ||
| } | ||
| completion left = async { | ||
| left_val = v19 * 0.0 + buf[20] | ||
| } | ||
| completion right = async { | ||
| right_val = v19 * 0.0 + buf[21] | ||
| } | ||
|
|
||
| awaitall | ||
|
|
||
| output_val = v0 + v1 + v2 + v3 + v4 + v5 + v6 | ||
| output_val = output_val + v7 + v8 + v9 + v10 + v11 | ||
| output_val = output_val + v12 + v13 + v14 + v15 + v16 | ||
| output_val = output_val + v17 + v18 + v19 | ||
| output_val = output_val + left_val + right_val | ||
| out_buf[0] = output_val | ||
|
|
||
| await send(out_buf, output[i, j]) | ||
| } | ||
| } |
File renamed without changes.
93 changes: 93 additions & 0 deletions
93
tests/csl_runtime/samples/task_recycling_three_stage_wse3.sptl
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| // Three sequential awaitall groups of 6 completions each. | ||
| // | ||
| // Key coloring property: | ||
| // Each awaitall group with 6 completions produces a 5-clique of blocked join | ||
| // tasks in the conflict graph. Tasks from different stages do not conflict | ||
| // (each stage is fully downstream of the previous one), so all three 5-cliques | ||
| // share the same 5 hardware slots. | ||
| // | ||
| // Total local tasks: ~18 (5 + 5 + 5 blocked tasks, T0, and join/final tasks). | ||
| // Chromatic number: 5. Average slot depth: ~3.5 tasks/slot. This exercises | ||
| // deeper slot reuse than the two-stage variant and demonstrates that the | ||
| // greedy coloring correctly reuses colors across non-conflicting stages. | ||
| // | ||
| // Mathematical result: sum(buf[0:18]). | ||
| kernel @task_recycling_three_stage<>(stream<f32, 24>[1, 1] readonly input, | ||
| stream<f32, 1>[1, 1] writeonly output) { | ||
| place u16 i, u16 j in [0:1, 0:1] { | ||
| f32[24] buf | ||
| f32 a0 | ||
| f32 a1 | ||
| f32 a2 | ||
| f32 a3 | ||
| f32 a4 | ||
| f32 a5 | ||
| f32 a6 | ||
| f32 a7 | ||
| f32 b0 | ||
| f32 b1 | ||
| f32 b2 | ||
| f32 b3 | ||
| f32 b4 | ||
| f32 b5 | ||
| f32 b6 | ||
| f32 b7 | ||
| f32 c0 | ||
| f32 c1 | ||
| f32 c2 | ||
| f32 c3 | ||
| f32 c4 | ||
| f32 c5 | ||
| f32 c6 | ||
| f32 c7 | ||
| f32 output_val | ||
| f32[1] out_buf | ||
| } | ||
|
|
||
| dataflow u16 i, u16 j in [0:1, 0:1] { | ||
| } | ||
|
|
||
| compute u16 i, u16 j in [0:1, 0:1] { | ||
| await receive(buf, input[i, j]) | ||
|
|
||
| // Stage 1: 6 completions, produces a 5-clique | ||
| completion s1_0 = async { a0 = buf[0] } | ||
| completion s1_1 = async { a1 = a0 * 0.0 + buf[1] } | ||
| completion s1_2 = async { a2 = a1 * 0.0 + buf[2] } | ||
| completion s1_3 = async { a3 = a2 * 0.0 + buf[3] } | ||
| completion s1_4 = async { a4 = a3 * 0.0 + buf[4] } | ||
| completion s1_5 = async { a5 = a4 * 0.0 + buf[5] } | ||
| completion s1_6 = async { a6 = a5 * 0.0 + buf[6] } | ||
| completion s1_7 = async { a7 = a6 * 0.0 + buf[7] } | ||
| awaitall | ||
|
|
||
| // Stage 2: 6 completions, another 5-clique sharing stage-1 slots | ||
| completion s2_0 = async { b0 = buf[8] } | ||
| completion s2_1 = async { b1 = b0 * 0.0 + buf[9] } | ||
| completion s2_2 = async { b2 = b1 * 0.0 + buf[10] } | ||
| completion s2_3 = async { b3 = b2 * 0.0 + buf[11] } | ||
| completion s2_4 = async { b4 = b3 * 0.0 + buf[12] } | ||
| completion s2_5 = async { b5 = b4 * 0.0 + buf[13] } | ||
| completion s2_6 = async { b6 = b5 * 0.0 + buf[14] } | ||
| completion s2_7 = async { b7 = b6 * 0.0 + buf[15] } | ||
| awaitall | ||
|
|
||
| // Stage 3: 6 completions, third 5-clique sharing the same 5 slots | ||
| completion s3_0 = async { c0 = buf[16] } | ||
| completion s3_1 = async { c1 = c0 * 0.0 + buf[17] } | ||
| completion s3_2 = async { c2 = c1 * 0.0 + buf[18] } | ||
| completion s3_3 = async { c3 = c2 * 0.0 + buf[19] } | ||
| completion s3_4 = async { c4 = c3 * 0.0 + buf[20] } | ||
| completion s3_5 = async { c5 = c4 * 0.0 + buf[21] } | ||
| completion s3_6 = async { c6 = c5 * 0.0 + buf[22] } | ||
| completion s3_7 = async { c7 = c6 * 0.0 + buf[23] } | ||
| awaitall | ||
|
|
||
| output_val = a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 | ||
| output_val = output_val + b0 + b1 + b2 + b3 + b4 + b5 + b6 + b7 | ||
| output_val = output_val + c0 + c1 + c2 + c3 + c4 + c5 + c6 + c7 | ||
| out_buf[0] = output_val | ||
|
|
||
| await send(out_buf, output[i, j]) | ||
| } | ||
| } |
File renamed without changes.
93 changes: 93 additions & 0 deletions
93
tests/csl_runtime/samples/task_recycling_two_stage_wse3.sptl
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| // Two sequential awaitall groups of 8 completions each. | ||
| // | ||
| // Key coloring property: | ||
| // Each awaitall with N completions creates N-1 blocked join tasks that form | ||
| // a clique in the conflict graph (they all have the main task as a common | ||
| // predecessor). With 8 completions per group that is a 7-clique per group. | ||
| // However, the two groups are fully sequential — every task in group 2 has | ||
| // every task in group 1 as an ancestor — so the two 7-cliques share no edges | ||
| // and can reuse the same 7 hardware slots. | ||
| // | ||
| // Total local tasks: ~15 (7 blocked in group 1, 7 blocked in group 2, T0, | ||
| // T_final, ...). Chromatic number: 7. Average slot depth: ~2 tasks/slot. | ||
| // | ||
| // The multiplication-by-zero trick (v * 0.0 + buf[k]) introduces a code-order | ||
| // dependency on v while keeping the mathematical value equal to buf[k], so the | ||
| // final result is simply sum(buf[0:16]). | ||
| kernel @task_recycling_two_stage<>(stream<f32, 24>[1, 1] readonly input, | ||
| stream<f32, 1>[1, 1] writeonly output) { | ||
| place u16 i, u16 j in [0:1, 0:1] { | ||
| f32[24] buf | ||
| f32 a0 | ||
| f32 a1 | ||
| f32 a2 | ||
| f32 a3 | ||
| f32 a4 | ||
| f32 a5 | ||
| f32 a6 | ||
| f32 a7 | ||
| f32 a8 | ||
| f32 a9 | ||
| f32 a10 | ||
| f32 a11 | ||
| f32 b0 | ||
| f32 b1 | ||
| f32 b2 | ||
| f32 b3 | ||
| f32 b4 | ||
| f32 b5 | ||
| f32 b6 | ||
| f32 b7 | ||
| f32 b8 | ||
| f32 b9 | ||
| f32 b10 | ||
| f32 b11 | ||
| f32 output_val | ||
| f32[1] out_buf | ||
| } | ||
|
|
||
| dataflow u16 i, u16 j in [0:1, 0:1] { | ||
| } | ||
|
|
||
| compute u16 i, u16 j in [0:1, 0:1] { | ||
| await receive(buf, input[i, j]) | ||
|
|
||
| // Stage 1: 8 completions | ||
| completion s1_0 = async { a0 = buf[0] } | ||
| completion s1_1 = async { a1 = a0 * 0.0 + buf[1] } | ||
| completion s1_2 = async { a2 = a1 * 0.0 + buf[2] } | ||
| completion s1_3 = async { a3 = a2 * 0.0 + buf[3] } | ||
| completion s1_4 = async { a4 = a3 * 0.0 + buf[4] } | ||
| completion s1_5 = async { a5 = a4 * 0.0 + buf[5] } | ||
| completion s1_6 = async { a6 = a5 * 0.0 + buf[6] } | ||
| completion s1_7 = async { a7 = a6 * 0.0 + buf[7] } | ||
| completion s1_8 = async { a8 = a7 * 0.0 + buf[8] } | ||
| completion s1_9 = async { a9 = a8 * 0.0 + buf[9] } | ||
| completion s1_10 = async { a10 = a9 * 0.0 + buf[10] } | ||
| completion s1_11 = async { a11 = a10 * 0.0 + buf[11] } | ||
| awaitall | ||
|
|
||
| // Stage 2: 8 completions (independent of stage 1's values) | ||
| completion s2_0 = async { b0 = buf[12] } | ||
| completion s2_1 = async { b1 = b0 * 0.0 + buf[13] } | ||
| completion s2_2 = async { b2 = b1 * 0.0 + buf[14] } | ||
| completion s2_3 = async { b3 = b2 * 0.0 + buf[15] } | ||
| completion s2_4 = async { b4 = b3 * 0.0 + buf[16] } | ||
| completion s2_5 = async { b5 = b4 * 0.0 + buf[17] } | ||
| completion s2_6 = async { b6 = b5 * 0.0 + buf[18] } | ||
| completion s2_7 = async { b7 = b6 * 0.0 + buf[19] } | ||
| completion s2_8 = async { b8 = b7 * 0.0 + buf[20] } | ||
| completion s2_9 = async { b9 = b8 * 0.0 + buf[21] } | ||
| completion s2_10 = async { b10 = b9 * 0.0 + buf[22] } | ||
| completion s2_11 = async { b11 = b10 * 0.0 + buf[23] } | ||
| awaitall | ||
|
|
||
| output_val = a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 | ||
| output_val = output_val + a8 + a9 + a10 + a11 | ||
| output_val = output_val + b0 + b1 + b2 + b3 + b4 + b5 + b6 + b7 | ||
| output_val = output_val + b8 + b9 + b10 + b11 | ||
| out_buf[0] = output_val | ||
|
|
||
| await send(out_buf, output[i, j]) | ||
| } | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Looks like some formatter was used that is different from what we use (yapf): https://github.com/spcl/spada/blob/main/.style.yapf
This creates a larger diff than it should be here.
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.
In the README the required style formatter for contributing is
black(which is also installed as part of the dev environment). I did not know that yapf schould be used, I will correct that!