Disable conv for Filter1x1Stride1Pad0 when K or C is even (#2186)

This commit is contained in:
Mateusz Ozga
2025-05-16 10:18:47 +02:00
committed by GitHub
parent 791802b381
commit fa3c6811d8
3 changed files with 11 additions and 0 deletions

View File

@@ -1206,6 +1206,13 @@ struct DeviceGroupedConvBwdWeight_Xdl_CShuffleV3
if constexpr(ConvBackwardWeightSpecialization ==
ConvolutionBackwardWeightSpecialization::Filter1x1Stride1Pad0)
{
// workaround: disable when K, C is even
#if CK_WORKAROUND_DISABLE_FILTER1x1STRIDE1PAD0_WHEN_K_C_IS_EVEN
if(arg.Conv_C_ % 2 == 0 || arg.Conv_K_ % 2 == 0)
{
return false;
}
#endif
// check if it's 1x1, stride=1 pad = 0 conv
for(int i = 0; i < NDimSpatial; i++)
{