Browse Source

fix(mgb): fix conv cudnnconvbackwarddata algo witch is not shake

GitOrigin-RevId: 379bfbe376
release-1.5
Megvii Engine Team 4 years ago
parent
commit
3591ef1f6a
2 changed files with 14 additions and 4 deletions
  1. +4
    -0
      dnn/src/cuda/cudnn_wrapper.cpp
  2. +10
    -4
      src/opr/impl/search_policy/algo_chooser.cpp

+ 4
- 0
dnn/src/cuda/cudnn_wrapper.cpp View File

@@ -485,7 +485,11 @@ CudnnAlgoPack::conv_bwd_data_algos() {
CudnnAlgoPack::Attr>
algos =
{ DEF_ALGO(CUDNN_CONVOLUTION_BWD_DATA_ALGO_0, false, false),
#if CUDNN_VERSION == 8004
DEF_ALGO(CUDNN_CONVOLUTION_BWD_DATA_ALGO_1, true, true),
#else
DEF_ALGO(CUDNN_CONVOLUTION_BWD_DATA_ALGO_1, true, false),
#endif
DEF_ALGO(CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT, true, true),
DEF_ALGO(CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING, true, true),
#if CUDNN_MAJOR >= 5


+ 10
- 4
src/opr/impl/search_policy/algo_chooser.cpp View File

@@ -471,16 +471,22 @@ AlgoChooser<Opr>::AlgoChooserHelper::get_profile_result_from_cache(
}
}

std::string layouts_str =
format_fixlayouts<Opr>(m_layouts, arity_in, arity_out);
if (skip_by_negative) {
mgb_log_error(
"No usable algo. There are available algos match positive "
"strategy(%s), but filtered by negative stategy(%s).",
"opr: %s, layouts: %s, No usable algo. There are available algos match "
"positive strategy(%s), but filtered by negative stategy(%s).",
m_base_mgb_opr->dyn_typeinfo()->name,
layouts_str.c_str(),
Algorithm::attribute_str(target_attr.first).c_str(),
Algorithm::attribute_str(target_attr.second).c_str());
} else {
mgb_log_error(
"No usable algo. algos read from cache could not satisfy "
"positive strategy(%s)",
"opr: %s, layouts: %s, No usable algo. algos read from cache could not "
"satisfy positive strategy(%s)",
m_base_mgb_opr->dyn_typeinfo()->name,
layouts_str.c_str(),
Algorithm::attribute_str(target_attr.first).c_str());
}



Loading…
Cancel
Save