[CK_TILE]enhance elementwise test (#2683)

* enhance elementwise

* fix ci issues
This commit is contained in:
joyeamd
2025-09-30 23:29:37 +08:00
committed by GitHub
parent e78a897ec0
commit b60af5bde9
2 changed files with 45 additions and 52 deletions

View File

@@ -104,24 +104,8 @@ struct ElementWiseKernel
template <typename... Ints>
CK_TILE_HOST static bool IsSupportedArgument(const ck_tile::tuple<Ints...>& input_sizes)
{
int total_elements = 1;
const auto kVectorM = Problem_::BlockShape::kVectorM;
apply([&](auto&&... args) { ((total_elements *= args), ...); }, input_sizes);
if((total_elements % kVectorM) != 0)
{
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
{
CK_TILE_ERROR("Conditions not met: total number of input elements (",
total_elements,
") should be multiple of the vectorization size (",
kVectorM,
")");
}
return false;
}
// when total elements % kVectorM != 0; should use Pad instead of unsupported
ignore = input_sizes;
return true;
}
};