diff --git a/test/correctness/shuffle.cpp b/test/correctness/shuffle.cpp index 0451cea23753..81eeb5a299b2 100644 --- a/test/correctness/shuffle.cpp +++ b/test/correctness/shuffle.cpp @@ -5,6 +5,10 @@ using namespace Halide; int main(int argc, char **argv) { Target target = get_jit_target_from_environment(); + if (target.has_feature(Target::Feature::Vulkan)) { + std::printf("[SKIP] Vulkan seems to be not working.\n"); + return 0; + } Var x{"x"}, y{"y"}; @@ -16,17 +20,14 @@ int main(int argc, char **argv) { Expr shuffle = Halide::Internal::Shuffle::make({vec1, vec2}, {3, 1, 6, 7, 2, 4, 0, 5}); Expr result = shuffle * shuffle; - if (true || target.has_feature(Target::Feature::Vulkan)) { - Expr a_half1 = Halide::Internal::Shuffle::make_slice(result, 0, 1, 4); - Expr a_half2 = Halide::Internal::Shuffle::make_slice(result, 4, 1, 4); - Expr a_sumhalves = a_half1 + a_half2; - Expr b_half1 = Halide::Internal::Shuffle::make_slice(a_sumhalves, 0, 1, 2); - Expr b_half2 = Halide::Internal::Shuffle::make_slice(a_sumhalves, 2, 1, 2); - Expr b_sumhalves = b_half1 + b_half2; - g(x) = Internal::Shuffle::make_extract_element(b_sumhalves, 0) + Halide::Internal::Shuffle::make_extract_element(b_sumhalves, 1); - } else { - g(x) = Internal::VectorReduce::make(Halide::Internal::VectorReduce::Add, result, 1); - } + // Manual logarithmic reduce. + Expr a_half1 = Halide::Internal::Shuffle::make_slice(result, 0, 1, 4); + Expr a_half2 = Halide::Internal::Shuffle::make_slice(result, 4, 1, 4); + Expr a_sumhalves = a_half1 + a_half2; + Expr b_half1 = Halide::Internal::Shuffle::make_slice(a_sumhalves, 0, 1, 2); + Expr b_half2 = Halide::Internal::Shuffle::make_slice(a_sumhalves, 2, 1, 2); + Expr b_sumhalves = b_half1 + b_half2; + g(x) = Internal::Shuffle::make_extract_element(b_sumhalves, 0) + Halide::Internal::Shuffle::make_extract_element(b_sumhalves, 1); f0.compute_root(); f1.compute_root();