Skip to content
Snippets Groups Projects
Commit 4b1630b2 authored by Aaron Councilman's avatar Aaron Councilman
Browse files

Restore gpu schedule

parent 199a8a80
No related branches found
No related tags found
1 merge request!205Fork reshape
This commit is part of merge request !205. Comments created here will be created in the context of that merge request.
macro optimize!(X) { phi-elim(*);
gvn(X);
phi-elim(X);
dce(X);
ip-sroa(X);
sroa(X);
dce(X);
gvn(X);
phi-elim(X);
dce(X);
}
macro codegen!(X) {
gcm(*);
float-collections(*);
dce(*);
gcm(*);
}
optimize!(*); forkify(*);
fork-guard-elim(*);
dce(*);
fixpoint panic after 20 { fixpoint {
forkify(matmul); reduce-slf(*);
fork-guard-elim(matmul); slf(*);
infer-schedules(*);
} }
fork-coalesce(*);
optimize!(*); infer-schedules(*);
dce(*);
fixpoint panic after 20 { rewrite(*);
reduce-slf(matmul); fixpoint {
slf(matmul); simplify-cfg(*);
infer-schedules(matmul); dce(*);
} }
dce(matmul);
// Tile outer and middle loops into 32x32 sized blocks ip-sroa(*);
fork-tile[32, 0, false, true](matmul@outer \ matmul@inner); sroa(*);
// Merge outer and middle loops and interchange so blocks are first dce(*);
fork-coalesce(matmul@outer \ matmul@inner);
fork-interchange[1, 2](matmul@outer \ matmul@inner);
// Split forks
let split = fork-split(matmul);
// Join the threads and then blocks into a single fork each
fork-coalesce(split.matmul.fj2 \ matmul@inner);
fork-coalesce(split.matmul.fj0 \ split.matmul.fj2);
let auto = auto-outline(*);
float-collections(*); float-collections(*);
gpu(auto.matmul); gcm(*);
codegen!(*);
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