-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the list of fused_pairs and run validate_fused_group for speca…
…lization definitions too (#6770) * Update the list of fused_pairs and run validate_fused_group for specialization definitions too. Fixes #6763. * Address review comments * Add const to auto&
- Loading branch information
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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,22 @@ | ||
#include "Halide.h" | ||
#include <stdio.h> | ||
|
||
using namespace Halide; | ||
|
||
int main(int argc, char **argv) { | ||
Var x("x"), y("y"), f("f"); | ||
ImageParam in(Int(16), 2, "in"); | ||
Func out0("out0"), out1("out1"); | ||
out0(x, y) = 1 * in(x, y); | ||
out1(x, y) = 2 * in(x, y); | ||
|
||
out0.vectorize(x, 8, TailStrategy::RoundUp); | ||
out1.vectorize(x, 8, TailStrategy::RoundUp).compute_with(out0, x); | ||
|
||
out0.specialize(in.dim(1).stride() == 128).fuse(x, y, f); | ||
Pipeline p({out0, out1}); | ||
p.compile_jit(); | ||
|
||
printf("Success!\n"); | ||
return 0; | ||
} |