Commit 8aa3f1be authored by Po Yen Chen's avatar Po Yen Chen
Browse files

Add lengths check in ctor of tile_window_with_static_distribution<>

parent 5a5464b1
...@@ -143,6 +143,16 @@ struct tile_window_with_static_distribution ...@@ -143,6 +143,16 @@ struct tile_window_with_static_distribution
tile_dstr_{tile_distribution}, tile_dstr_{tile_distribution},
pre_computed_coords_{} pre_computed_coords_{}
{ {
// check if window_lengths is matching the shape of tile_distribution
static_assert(WindowLengths::size() == TileDstr::NDimX);
static_for<0, TileDstr::NDimX, 1>{}([&](auto dim) {
if constexpr(is_number_v<decltype(window_lengths[dim])>)
{
constexpr index_t window_length = decltype(window_lengths[dim])::value;
static_assert(window_length == TileDstr::get_lengths()[dim]);
}
});
#if 0 // debug #if 0 // debug
// TODO: this use more register for FA, but less register for GEMM // TODO: this use more register for FA, but less register for GEMM
// need investigation // need investigation
......
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