Commit 6230f4ec authored by Harisankar Sadasivan's avatar Harisankar Sadasivan
Browse files

block to ctile map for tall and skinny gemm

parent 49facb91
......@@ -658,6 +658,14 @@ struct BlockToCTileMap_3DGrid_KSplit
return make_tuple(blockIdx.z, blockIdx.y, blockIdx.x);
}
__host__ __device__ inline constexpr auto convert_1D_block_idx_to_3D_tuple(
const index_t& block_1d_id, const index_t& N, const index_t& k_batch) const
{
const auto Ndim = math::integer_divide_ceil(N, NPerBlock);
return make_tuple(((block_1d_id) / (k_batch * Ndim)),
(((block_1d_id) / k_batch) % Ndim),
(block_1d_id) % k_batch); // returns 3D tuple as (Mid,Nid,Kid)
}
template <typename CTileIdx, typename CTileDim>
__host__ __device__ bool ValidCTileIndex(const CTileIdx& /* c_tile_idx */,
const CTileDim& /* c_tile_dim */) const
......
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