Skip to content
Snippets Groups Projects
Commit 0caa58c5 authored by Russel Arbore's avatar Russel Arbore
Browse files

Test requiring outer split + unforkify

parent c7d47ec8
No related branches found
No related tags found
3 merge requests!157Fork fission bufferize,!144Forkify fixes,!142More fork tests, bug fixes in fork passes and GPU backend
Pipeline #201349 failed
This commit is part of merge request !144. Comments created here will be created in the context of that merge request.
...@@ -44,3 +44,18 @@ fn test3(input : i32) -> i32[3, 3] { ...@@ -44,3 +44,18 @@ fn test3(input : i32) -> i32[3, 3] {
} }
return arr3; return arr3;
} }
#[entry]
fn test4(input : i32) -> i32[4, 4] {
let arr : i32[4, 4];
for i = 0 to 4 {
for j = 0 to 4 {
let acc = arr[i, j];
for k = 0 to 7 {
acc += input;
}
arr[i, j] = acc;
}
}
return arr;
}
...@@ -6,6 +6,7 @@ let out = auto-outline(*); ...@@ -6,6 +6,7 @@ let out = auto-outline(*);
gpu(out.test1); gpu(out.test1);
gpu(out.test2); gpu(out.test2);
gpu(out.test3); gpu(out.test3);
gpu(out.test4);
ip-sroa(*); ip-sroa(*);
sroa(*); sroa(*);
......
...@@ -32,6 +32,11 @@ fn main() { ...@@ -32,6 +32,11 @@ fn main() {
let output = r.run(0).await; let output = r.run(0).await;
let correct = vec![11, 10, 9, 10, 9, 8, 9, 8, 7]; let correct = vec![11, 10, 9, 10, 9, 8, 9, 8, 7];
assert(correct, output); assert(correct, output);
let mut r = runner!(test4);
let output = r.run(9).await;
let correct = vec![63i32; 16];
assert(correct, output);
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment