Skip to content

Commit bd953f0

Browse files
carlushuangjunliume
authored andcommitted
[Workaround][Issue #2867] Disable iGEMM kernels for corner configuration (#2869)
1 parent 261a497 commit bd953f0

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/include/miopen/conv/asm_implicit_gemm.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
/// https://github.com/ROCm/MIOpen/issues/2624
4444
#define WORKAROUND_ISSUE_2624 1
4545

46+
/// W/A for issue 2624: asm igemm wrw computation error with stride=2, padding=2, filter=3, h=w=1
47+
/// https://github.com/ROCm/MIOpen/issues/2867
48+
#define WORKAROUND_ISSUE_2867 1
49+
4650
namespace miopen {
4751

4852
namespace solver {

src/solver/conv_asm_implicit_gemm_gtc_wrw_nhwc.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,25 @@ bool ConvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC::IsApplicable(
864864
return false;
865865
#endif
866866

867+
#if WORKAROUND_ISSUE_2867
868+
{
869+
const int hi = problem.GetOutHeight();
870+
const int wi = problem.GetOutWidth();
871+
const int k = problem.GetInChannels();
872+
const int c = problem.GetOutChannels();
873+
const int y = problem.GetWeightsHeight();
874+
const int x = problem.GetWeightsWidth();
875+
const auto stride_h = problem.GetKernelStrideH();
876+
const auto stride_w = problem.GetKernelStrideW();
877+
const auto pad_h = problem.GetPadH();
878+
const auto pad_w = problem.GetPadW();
879+
880+
if(c == 1 && k == 1 && hi == 1 && wi == 1 && y == 3 && x == 3 && pad_h == 2 && pad_w == 2 &&
881+
stride_h == 2 && stride_w == 2)
882+
return false;
883+
}
884+
#endif
885+
867886
const auto device_name = ctx.GetStream().GetDeviceName();
868887
if((device_name != "gfx908") && (device_name != "gfx90a") &&
869888
(!StartsWith(device_name, "gfx94")))

0 commit comments

Comments
 (0)