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

simple test

parent 02ba90c1
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 #201331 failed
......@@ -1130,6 +1130,16 @@ dependencies = [
"with_builtin_macros",
]
[[package]]
name = "juno_fork_join_tests"
version = "0.1.0"
dependencies = [
"async-std",
"hercules_rt",
"juno_build",
"with_builtin_macros",
]
[[package]]
name = "juno_frontend"
version = "0.1.0"
......
......@@ -31,4 +31,5 @@ members = [
"juno_samples/concat",
"juno_samples/schedule_test",
"juno_samples/edge_detection",
"juno_samples/fork_join_tests",
]
[package]
name = "juno_fork_join_tests"
version = "0.1.0"
authors = ["Russel Arbore <rarbore2@illinois.edu>"]
edition = "2021"
[[bin]]
name = "juno_fork_join_tests"
path = "src/main.rs"
[features]
cuda = ["juno_build/cuda", "hercules_rt/cuda"]
[build-dependencies]
juno_build = { path = "../../juno_build" }
[dependencies]
juno_build = { path = "../../juno_build" }
hercules_rt = { path = "../../hercules_rt" }
with_builtin_macros = "0.1.0"
async-std = "*"
use juno_build::JunoCompiler;
fn main() {
#[cfg(not(feature = "cuda"))]
{
JunoCompiler::new()
.file_in_src("fork_join_tests.jn")
.unwrap()
.schedule_in_src("cpu.sch")
.unwrap()
.build()
.unwrap();
}
#[cfg(feature = "cuda")]
{
JunoCompiler::new()
.file_in_src("fork_join_tests.jn")
.unwrap()
.schedule_in_src("gpu.sch")
.unwrap()
.build()
.unwrap();
}
}
#[entry]
fn test1(input : i32) -> i32[4, 4] {
let arr : i32[4, 4];
for i = 0 to 4 {
for j = 0 to 4 {
arr[i, j] = input;
}
}
return arr;
}
gvn(*);
phi-elim(*);
dce(*);
let out = auto-outline(*);
gpu(out.test1);
ip-sroa(*);
sroa(*);
dce(*);
gvn(*);
phi-elim(*);
dce(*);
fixpoint panic after 20 {
forkify(*);
fork-guard-elim(*);
fork-coalesce(*);
}
gvn(*);
phi-elim(*);
dce(*);
fixpoint panic after 20 {
infer-schedules(*);
}
xdot[true](*);
gcm(*);
#![feature(concat_idents)]
use hercules_rt::runner;
juno_build::juno!("fork_join_tests");
fn main() {
async_std::task::block_on(async {
let mut r = runner!(tests1);
let output = r.run(5).await;
});
}
#[test]
fn implicit_clone_test() {
main();
}
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