Commit 49eb83aa authored by rocking's avatar rocking
Browse files

Refine the check of YDstVectorSize

parent 47fec082
...@@ -282,6 +282,9 @@ struct DeviceNormalizationImpl : public DeviceNormalization<XDataType, ...@@ -282,6 +282,9 @@ struct DeviceNormalizationImpl : public DeviceNormalization<XDataType,
if(p_arg_->invariant_lowest_length % XSrcVectorSize != 0) if(p_arg_->invariant_lowest_length % XSrcVectorSize != 0)
return false; return false;
if(p_arg_->invariant_lowest_length % YDstVectorSize != 0)
return false;
}; };
} }
else else
...@@ -291,12 +294,12 @@ struct DeviceNormalizationImpl : public DeviceNormalization<XDataType, ...@@ -291,12 +294,12 @@ struct DeviceNormalizationImpl : public DeviceNormalization<XDataType,
if(p_arg_->Lengths_[Rank - 1] % XSrcVectorSize != 0) if(p_arg_->Lengths_[Rank - 1] % XSrcVectorSize != 0)
return false; return false;
};
if(p_arg_->Lengths_[Rank - 1] % YDstVectorSize != 0) if(p_arg_->Lengths_[Rank - 1] % YDstVectorSize != 0)
{ {
return false; return false;
} }
};
// if fastest dim is not reduced // if fastest dim is not reduced
if constexpr(GammaSrcVectorDim == 0) if constexpr(GammaSrcVectorDim == 0)
......
...@@ -530,6 +530,9 @@ struct DeviceNormalizationSplitKImpl : public DeviceNormalization<XDataType, ...@@ -530,6 +530,9 @@ struct DeviceNormalizationSplitKImpl : public DeviceNormalization<XDataType,
if(p_arg_->invariant_lowest_length % XSrcVectorSize != 0) if(p_arg_->invariant_lowest_length % XSrcVectorSize != 0)
return false; return false;
if(p_arg_->invariant_lowest_length % YDstVectorSize != 0)
return false;
}; };
} }
else else
...@@ -539,12 +542,10 @@ struct DeviceNormalizationSplitKImpl : public DeviceNormalization<XDataType, ...@@ -539,12 +542,10 @@ struct DeviceNormalizationSplitKImpl : public DeviceNormalization<XDataType,
if(p_arg_->Lengths_[Rank - 1] % XSrcVectorSize != 0) if(p_arg_->Lengths_[Rank - 1] % XSrcVectorSize != 0)
return false; return false;
};
if(p_arg_->Lengths_[Rank - 1] % YDstVectorSize != 0) if(p_arg_->Lengths_[Rank - 1] % YDstVectorSize != 0)
{ return false;
return false; };
}
// if fastest dim is not reduced // if fastest dim is not reduced
if constexpr(GammaSrcVectorDim == 0) if constexpr(GammaSrcVectorDim == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment