diff --git a/sdk/load-and-run/src/mgblar.cpp b/sdk/load-and-run/src/mgblar.cpp index 046ecb98..908bb756 100644 --- a/sdk/load-and-run/src/mgblar.cpp +++ b/sdk/load-and-run/src/mgblar.cpp @@ -703,7 +703,7 @@ void run_test_st(Args &env) { mgb::gopt::set_opr_algo_workspace_limit_inplace(vars, env.workspace_limit); using S = opr::mixin::AlgoChooserHelper::ExecutionPolicy::Strategy; - S strategy = S::HEURISTIC; + S strategy = static_cast(0); if (env.reproducible) { strategy = S::REPRODUCIBLE; } diff --git a/src/opr/impl/search_policy/algo_chooser.cpp b/src/opr/impl/search_policy/algo_chooser.cpp index 4bf2dc48..57a0d3f6 100644 --- a/src/opr/impl/search_policy/algo_chooser.cpp +++ b/src/opr/impl/search_policy/algo_chooser.cpp @@ -868,6 +868,23 @@ template typename AlgoChooser::ImplExecutionPolicy AlgoChooser::get_policy( const AlgoChooserHelper& helper) { auto opr_strategy = helper.execution_policy().strategy; + auto strategy2str = [](auto strategy) { + std::string ret; + if (strategy & ExecutionStrategy::HEURISTIC) { + ret += "HEURISTIC "; + } + if (strategy & ExecutionStrategy::PROFILE) { + ret += "PROFILE "; + } + if (strategy & ExecutionStrategy::REPRODUCIBLE) { + ret += "REPRODUCIBLE "; + } + if (strategy & ExecutionStrategy::OPTIMIZED) { + ret += "OPTIMIZED "; + } + return ret; + }; + mgb_log_debug("Use Stragegy :%s", strategy2str(opr_strategy).c_str()); if (opr_strategy & ExecutionStrategy::HEURISTIC) { if (opr_strategy & ExecutionStrategy::PROFILE) { //! this strategy will choose from cache first, then choost by