Skip to content

Commit

Permalink
new env var MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_WORKSPACE_MAX (#2079)
Browse files Browse the repository at this point in the history
  • Loading branch information
shurale-nkn authored and Daniel Lowell committed Sep 18, 2019
1 parent 18c949e commit d47501c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/solver/conv_multipass_wino3x3WrW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ MIOPEN_DECLARE_ENV_VAR(MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X3)
MIOPEN_DECLARE_ENV_VAR(MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X4)
MIOPEN_DECLARE_ENV_VAR(MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X5)
MIOPEN_DECLARE_ENV_VAR(MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X6)
MIOPEN_DECLARE_ENV_VAR(MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_WORKSPACE_MAX)

// Introduces a number of shader-specific aliases (names) in the current scope at zero cost.
// These names represent shader parameters, e.g. shader C is batch_size etc and useful for
Expand Down Expand Up @@ -378,7 +379,10 @@ bool ConvWinograd3x3MultipassWrW<WinoDataW, WinoFilterW>::IsApplicable(
{
return false;
}

if(miopen::Value(MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_WORKSPACE_MAX{}) != 0)
if(miopen::Value(MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_WORKSPACE_MAX{}) <
GetWorkspaceSize(params))
return false;
// int offset for Workspace buffers.
if((InTransform<WinoDataW, WinoFilterW>::GetBufferSize(params) /
GetTypeSize(params.in_data_type) +
Expand Down

0 comments on commit d47501c

Please sign in to comment.