Skip to content

Commit

Permalink
[Workaround][Issue #2867] Disable iGEMM kernels for corner configurat…
Browse files Browse the repository at this point in the history
…ion (#2869)
  • Loading branch information
carlushuang authored and junliume committed Apr 9, 2024
1 parent 261a497 commit bd953f0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/include/miopen/conv/asm_implicit_gemm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
/// https://github.com/ROCm/MIOpen/issues/2624
#define WORKAROUND_ISSUE_2624 1

/// W/A for issue 2624: asm igemm wrw computation error with stride=2, padding=2, filter=3, h=w=1
/// https://github.com/ROCm/MIOpen/issues/2867
#define WORKAROUND_ISSUE_2867 1

namespace miopen {

namespace solver {
Expand Down
19 changes: 19 additions & 0 deletions src/solver/conv_asm_implicit_gemm_gtc_wrw_nhwc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,25 @@ bool ConvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC::IsApplicable(
return false;
#endif

#if WORKAROUND_ISSUE_2867
{
const int hi = problem.GetOutHeight();
const int wi = problem.GetOutWidth();
const int k = problem.GetInChannels();
const int c = problem.GetOutChannels();
const int y = problem.GetWeightsHeight();
const int x = problem.GetWeightsWidth();
const auto stride_h = problem.GetKernelStrideH();
const auto stride_w = problem.GetKernelStrideW();
const auto pad_h = problem.GetPadH();
const auto pad_w = problem.GetPadW();

if(c == 1 && k == 1 && hi == 1 && wi == 1 && y == 3 && x == 3 && pad_h == 2 && pad_w == 2 &&
stride_h == 2 && stride_w == 2)
return false;
}
#endif

const auto device_name = ctx.GetStream().GetDeviceName();
if((device_name != "gfx908") && (device_name != "gfx90a") &&
(!StartsWith(device_name, "gfx94")))
Expand Down

0 comments on commit bd953f0

Please sign in to comment.