From 3bec0b723247b642708343c95e606aba02de7936 Mon Sep 17 00:00:00 2001 From: mtgu0705 Date: Fri, 3 Jan 2025 14:14:36 +0800 Subject: [PATCH] fixed a bug in the ckProfiler, and formatted the code --- include/ck/utility/data_type.hpp | 2 +- profiler/include/profiler/profile_gemm_b_scale_impl.hpp | 2 +- profiler/src/profile_gemm_b_scale.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/ck/utility/data_type.hpp b/include/ck/utility/data_type.hpp index 4d2b502b57..94608f5dcf 100644 --- a/include/ck/utility/data_type.hpp +++ b/include/ck/utility/data_type.hpp @@ -20,7 +20,7 @@ struct pk_i4_t __host__ __device__ constexpr pk_i4_t() : data{type{}} {} __host__ __device__ constexpr pk_i4_t(type init) : data{init} {} - __host__ __device__ constexpr operator float() const { return static_cast(data); } + __host__ __device__ constexpr operator float() const { return static_cast(data); } }; inline constexpr auto next_pow2(uint32_t x) diff --git a/profiler/include/profiler/profile_gemm_b_scale_impl.hpp b/profiler/include/profiler/profile_gemm_b_scale_impl.hpp index fe977e766e..d01d48892c 100644 --- a/profiler/include/profiler/profile_gemm_b_scale_impl.hpp +++ b/profiler/include/profiler/profile_gemm_b_scale_impl.hpp @@ -342,7 +342,7 @@ bool profile_gemm_b_scale_impl(int do_verification, if(do_log) { LogRangeAsType(std::cout << "a : ", a_m_k.mData, ",") << std::endl; - LogRangeAsType(std::cout << "b: ", b_k_n.mData, ",") << std::endl; + LogRangeAsType(std::cout << "b: ", b_k_n.mData, ",") << std::endl; LogRangeAsType( std::cout << "c_host : ", c_m_n_host_result.mData, ",") << std::endl; diff --git a/profiler/src/profile_gemm_b_scale.cpp b/profiler/src/profile_gemm_b_scale.cpp index 4c77dad380..443ebff834 100644 --- a/profiler/src/profile_gemm_b_scale.cpp +++ b/profiler/src/profile_gemm_b_scale.cpp @@ -103,9 +103,9 @@ int profile_gemm_b_scale(int argc, char* argv[]) printf("n_warmup:%d, n_iter:%d, rotating:%lu\n", n_warmup, n_iter, rotating); } - using F32 = float; - using F16 = ck::half_t; - using I4 = ck::pk_i4_t; + using F32 = float; + using F16 = ck::half_t; + using I4 = ck::pk_i4_t; using Row = ck::tensor_layout::gemm::RowMajor; using Col = ck::tensor_layout::gemm::ColumnMajor;