Skip to content

Commit

Permalink
[debugging] Make naive conv solvers obey MIOPEN_DEBUG_HIP_KERNELS (#3111
Browse files Browse the repository at this point in the history
)
  • Loading branch information
atamazov committed Jul 22, 2024
1 parent 36ab779 commit 3991184
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
10 changes: 7 additions & 3 deletions src/solver/conv/conv_direct_naive_conv_bwd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ using ProblemDescription = miopen::conv::ProblemDescription;
bool ConvDirectNaiveConvBwd::IsApplicable(const ExecutionContext& ctx,
const ProblemDescription& problem) const
{
if(!miopen::debug::AlwaysEnableConvDirectNaive &&
env::disabled(MIOPEN_DEBUG_CONV_DIRECT_NAIVE_CONV_BWD))
return false;
if(!miopen::debug::AlwaysEnableConvDirectNaive)
{
if(env::disabled(MIOPEN_DEBUG_CONV_DIRECT_NAIVE_CONV_BWD))
return false;
if(!ctx.use_hip_kernels)
return false;
}

if(!ConvDirectNaiveConvIsApplicableByKernelType(ctx, problem))
return false;
Expand Down
10 changes: 7 additions & 3 deletions src/solver/conv/conv_direct_naive_conv_fwd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ using ProblemDescription = miopen::conv::ProblemDescription;
bool ConvDirectNaiveConvFwd::IsApplicable(const ExecutionContext& ctx,
const ProblemDescription& problem) const
{
if(!miopen::debug::AlwaysEnableConvDirectNaive &&
env::disabled(MIOPEN_DEBUG_CONV_DIRECT_NAIVE_CONV_FWD))
return false;
if(!miopen::debug::AlwaysEnableConvDirectNaive)
{
if(env::disabled(MIOPEN_DEBUG_CONV_DIRECT_NAIVE_CONV_FWD))
return false;
if(!ctx.use_hip_kernels)
return false;
}

if(!ConvDirectNaiveConvIsApplicableByKernelType(ctx, problem))
return false;
Expand Down
10 changes: 7 additions & 3 deletions src/solver/conv/conv_direct_naive_conv_wrw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ using ProblemDescription = miopen::conv::ProblemDescription;
bool ConvDirectNaiveConvWrw::IsApplicable(const ExecutionContext& ctx,
const ProblemDescription& problem) const
{
if(!miopen::debug::AlwaysEnableConvDirectNaive &&
env::disabled(MIOPEN_DEBUG_CONV_DIRECT_NAIVE_CONV_WRW))
return false;
if(!miopen::debug::AlwaysEnableConvDirectNaive)
{
if(env::disabled(MIOPEN_DEBUG_CONV_DIRECT_NAIVE_CONV_WRW))
return false;
if(!ctx.use_hip_kernels)
return false;
}

if(!ConvDirectNaiveConvIsApplicableByKernelType(ctx, problem))
return false;
Expand Down

0 comments on commit 3991184

Please sign in to comment.