Commit f5d3f160 authored by Paul's avatar Paul
Browse files

Fix assert

parent f903e858
......@@ -30,6 +30,7 @@
#include <migraphx/kernels/tensor_view.hpp>
#include <migraphx/kernels/ck.hpp>
#include <migraphx/kernels/ck_gemm_includes.hpp>
#include <migraphx/kernels/print.hpp>
namespace migraphx {
......@@ -59,7 +60,7 @@ __device__ void ck_gemm(E e, A a, B b, Ds... ds)
constexpr auto e_grid_desc_mblock_mperblock_nblock_nperblock =
GridwiseGemm::MakeEGridDescriptor_MBlock_MPerBlock_NBlock_NPerBlock(e_grid_desc_m_n);
MIGRAPHX_CK_STATIC_ASSERT(GridwiseGemm::CheckValidity(
MIGRAPHX_CK_STATIC_ASSERT(G::CheckValidity(
a_grid_desc_m_k, b_grid_desc_n_k, ds_grid_desc_m_n, e_grid_desc_m_n, block_2_etile_map));
__shared__ char p_shared_block[GridwiseGemm::GetSharedMemoryNumberOfByte()];
......
......@@ -233,18 +233,18 @@ struct CK_DeviceGemmMultipleD
const EGridDesc_M_N& e_grid_desc_m_n,
const Block2ETileMap& block_2_etile_map)
{
constexpr auto M = a_grid_desc_m_k.GetLength(I0);
constexpr auto N = b_grid_desc_n_k.GetLength(I0);
constexpr auto K = a_grid_desc_m_k.GetLength(I1);
const auto M = a_grid_desc_m_k.GetLength(I0);
const auto N = b_grid_desc_n_k.GetLength(I0);
const auto K = a_grid_desc_m_k.GetLength(I1);
// check consistency of desc
static_assert(M == e_grid_desc_m_n.GetLength(I0) && N == e_grid_desc_m_n.GetLength(I1));
MIGRAPHX_CHECK(M == e_grid_desc_m_n.GetLength(I0) && N == e_grid_desc_m_n.GetLength(I1));
// check tile size
static_assert(M % MPerBlock == 0 && N % NPerBlock == 0 && K % KPerBlock == 0);
MIGRAPHX_CHECK(M % MPerBlock == 0 && N % NPerBlock == 0 && K % KPerBlock == 0);
// check block-to-E-tile
static_assert(block_2_etile_map.CheckValidity(e_grid_desc_m_n));
MIGRAPHX_CHECK(block_2_etile_map.CheckValidity(e_grid_desc_m_n));
return GridwiseGemm::CheckValidity(
a_grid_desc_m_k, b_grid_desc_n_k, ds_grid_desc_m_n, e_grid_desc_m_n, block_2_etile_map);
......
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