From 2811a4e1de51a3446d14706d6d8bc7e987aae483 Mon Sep 17 00:00:00 2001 From: TianyuanWu Date: Wed, 6 Aug 2025 10:30:00 +0800 Subject: [PATCH] Add get_device_ip() Signed-off-by: TianyuanWu --- include/ck_tile/core/arch/arch.hpp | 9 +++++++++ .../warp/warp_gemm_attribute_wmma_impl.hpp | 19 ++++--------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/include/ck_tile/core/arch/arch.hpp b/include/ck_tile/core/arch/arch.hpp index 521d285739..a8237068d8 100644 --- a/include/ck_tile/core/arch/arch.hpp +++ b/include/ck_tile/core/arch/arch.hpp @@ -246,4 +246,13 @@ struct gfx12_t { }; +CK_TILE_DEVICE static constexpr auto get_device_ip() +{ +#if defined(__gfx11__) + return gfx11_t{}; +#else // if defined(__gfx12__) + return gfx12_t{}; +#endif +} + } // namespace ck_tile diff --git a/include/ck_tile/ops/gemm/warp/warp_gemm_attribute_wmma_impl.hpp b/include/ck_tile/ops/gemm/warp/warp_gemm_attribute_wmma_impl.hpp index 36f757de63..623d7c5313 100644 --- a/include/ck_tile/ops/gemm/warp/warp_gemm_attribute_wmma_impl.hpp +++ b/include/ck_tile/ops/gemm/warp/warp_gemm_attribute_wmma_impl.hpp @@ -76,12 +76,9 @@ struct WarpGemmAttributeWmmaImpl } }; +using DeviceIp = remove_cvref_t; using WarpGemmAttributeWmmaImpl_f32_16x16x16_f16_f16 = WarpGemmAttributeWmmaImpl>; using WarpGemmAttributeWmmaImpl_f32_16x16x16_bf16_bf16 = WarpGemmAttributeWmmaImpl>; using WarpGemmAttributeWmmaImpl_i32_16x16x16_i8_i8 = WarpGemmAttributeWmmaImpl