From 96acbc6c23d9fdb7c267c77cac082d25acd2359d Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Tue, 2 May 2023 13:37:47 -0700 Subject: [PATCH] Workaround for Issue #7539 (#7540) * Workaround for Issue #7539 Partial fix for now * trigger buildbots --- src/Module.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Module.cpp b/src/Module.cpp index 86389a964045..02584782a396 100644 --- a/src/Module.cpp +++ b/src/Module.cpp @@ -1016,6 +1016,17 @@ void compile_multitarget(const std::string &fn_name, std::string scheduler = autoscheduler_params.name.empty() ? "(None)" : autoscheduler_params.name; std::string autoscheduler_params_string = autoscheduler_params.name.empty() ? "(None)" : autoscheduler_params.to_string(); + // TODO(https://github.com/halide/Halide/issues/7539): this is a horrible hack; + // the Anderson2021 autoscheduler is GPU-only, and emits the same schedule for each subtarget. + // Avoid confusing noise in the output by just lopping off all results aftet the first one. + // This isn't a good fix; aside from the hack here, we also are wasting time recomputing the + // same schedule multiple times above. + if (scheduler == "Anderson2021") { + while (auto_scheduler_results.size() > 1) { + auto_scheduler_results.pop_back(); + } + } + // Find the features that are unique to each stage (vs the baseline case). const auto &baseline_target = auto_scheduler_results.back().target; const auto &baseline_features = baseline_target.get_features_bitset();