Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CK][HIP] limit the range of several CK HIP kernels #2005

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/solver/conv_hip_implicit_gemm_bwd_data_xdlops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#if MIOPEN_BACKEND_HIP && MIOPEN_USE_COMPOSABLEKERNEL
#include <ck/library/tensor_operation_instance/gpu/convolution_backward_data.hpp>
#endif
#include <miopen/solver/implicitgemm_util.hpp>
MIOPEN_DECLARE_ENV_VAR(MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_BWD_XDLOPS)

namespace miopen {
Expand Down Expand Up @@ -367,6 +368,8 @@ bool ConvHipImplicitGemmBwdXdlops::IsApplicable(const ConvolutionContext& ctx,
return false;
if(arch == "gfx90a" && problem.conv_problem.IsGfx90aFp16altRequired())
return false;
if(!IsIndexRangeLargeEnough(problem))
return false;
switch(problem.conv_problem.GetInDataType())
{
case miopenHalf: return CheckCKApplicability<ck::half_t>(problem);
Expand Down
2 changes: 2 additions & 0 deletions src/solver/conv_hip_implicit_gemm_bwd_v1r1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,8 @@ bool ConvHipImplicitGemmBwdDataV1R1::IsApplicable(const ConvolutionContext& ctx,
return false;
if(problem.group_counts != 1)
return false;
if(!IsIndexRangeLargeEnough(problem))
return false;
#if WORKAROUND_ISSUE_309
if(problem.IsBfp16())
return false;
Expand Down
4 changes: 4 additions & 0 deletions src/solver/conv_hip_implicit_gemm_bwd_v4r1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,10 @@ bool ConvHipImplicitGemmBwdDataV4R1::IsApplicable(const ConvolutionContext& ctx,
{
return false;
}

if(!IsIndexRangeLargeEnough(problem))
return false;

int gemm_m = 0;
int gemm_n = 0;

Expand Down
4 changes: 4 additions & 0 deletions src/solver/conv_hip_implicit_gemm_fwd_v4r1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ bool ConvHipImplicitGemmV4R1Fwd::IsApplicable(const ConvolutionContext& ctx,
return false;
if(!problem.IsFp32() && !problem.IsFp16() && !problem.IsBfp16())
return false;
if(!IsIndexRangeLargeEnough(problem))
return false;
if(!problem.IsLayoutDefault())
return false;
if(ctx.GetStream().GetDeviceName() == "gfx90a" &&
Expand Down Expand Up @@ -95,6 +97,8 @@ bool ConvHipImplicitGemmV4R1WrW::IsApplicable(const ConvolutionContext& ctx,
return false;
if(!problem.IsFp32() && !problem.IsFp16() && !problem.IsBfp16())
return false;
if(!IsIndexRangeLargeEnough(problem))
return false;
if(!problem.IsLayoutDefault())
return false;
if(ctx.GetStream().GetDeviceName() == "gfx90a" &&
Expand Down
2 changes: 2 additions & 0 deletions src/solver/conv_hip_implicit_gemm_fwd_v4r4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,8 @@ bool ConvHipImplicitGemmV4R4Fwd::IsApplicable(const ConvolutionContext& ctx,
return false;
if(problem.group_counts != 1)
return false;
if(!IsIndexRangeLargeEnough(problem))
return false;

int gemm_m = 0;
int gemm_n = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/solver/conv_hip_implicit_gemm_fwd_xdlops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#if MIOPEN_BACKEND_HIP && MIOPEN_USE_COMPOSABLEKERNEL
#include <ck/library/tensor_operation_instance/gpu/convolution_forward.hpp>
#endif
#include <miopen/solver/implicitgemm_util.hpp>
MIOPEN_DECLARE_ENV_VAR(MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS)

namespace miopen {
Expand Down Expand Up @@ -347,6 +348,8 @@ bool ConvHipImplicitGemmFwdXdlops::IsApplicable(const ConvolutionContext& ctx,
return false;
if(arch == "gfx90a" && problem.conv_problem.IsGfx90aFp16altRequired())
return false;
if(!IsIndexRangeLargeEnough(problem))
return false;
if(!problem.IsLayoutNHWC())
return false;
switch(problem.conv_problem.GetInDataType())
Expand Down
2 changes: 2 additions & 0 deletions src/solver/conv_hip_implicit_gemm_wrw_v4r4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ bool ConvHipImplicitGemmV4R4WrW::IsApplicable(const ConvolutionContext& ctx,
return false;
if(problem.group_counts != 1)
return false;
if(!IsIndexRangeLargeEnough(problem))
return false;

int gemm_m = 0;
int gemm_n = 0;
Expand Down