From 720435225296d637fb721ad7c4fc36b32d84f8d2 Mon Sep 17 00:00:00 2001 From: Vladislav Golubev Date: Thu, 10 Oct 2024 13:06:41 +0200 Subject: [PATCH] Cleanup --- .../x64/kernel_executors/brgemm_copy_b.cpp | 29 ------------------- src/plugins/intel_cpu/src/nodes/subgraph.cpp | 17 ----------- 2 files changed, 46 deletions(-) diff --git a/src/plugins/intel_cpu/src/emitters/snippets/x64/kernel_executors/brgemm_copy_b.cpp b/src/plugins/intel_cpu/src/emitters/snippets/x64/kernel_executors/brgemm_copy_b.cpp index 104c18ab145f96..9121a292828b81 100644 --- a/src/plugins/intel_cpu/src/emitters/snippets/x64/kernel_executors/brgemm_copy_b.cpp +++ b/src/plugins/intel_cpu/src/emitters/snippets/x64/kernel_executors/brgemm_copy_b.cpp @@ -234,9 +234,6 @@ void BrgemmCopyBKernel::emit_brgemm_copy_b_kernel_call(size_t N, size_t K, size_ spill.postamble(); } -uintptr_t base_addr_src = 0; -uintptr_t base_addr_dst = 0; - void BrgemmCopyBKernel::execute(matmul::jit_brgemm_matmul_copy_b_t* kernel, const void* src, const void* dst, const void* comp, size_t N, size_t K) { auto ctx = matmul::jit_brgemm_matmul_copy_b_t::ctx_t(); ctx.current_N_blk = N; @@ -248,36 +245,14 @@ void BrgemmCopyBKernel::execute(matmul::jit_brgemm_matmul_copy_b_t* kernel, cons ctx.current_K_start = 0; ctx.current_K_iters = K; - if (base_addr_src == 0) - base_addr_src = reinterpret_cast(src); - else - std::cout << "Stride from base_addr_src = " << reinterpret_cast(src) - base_addr_src << std::endl; - if (base_addr_dst == 0) - base_addr_dst = reinterpret_cast(dst); - else - std::cout << "Stride from base_addr_dst = " << reinterpret_cast(dst) - base_addr_dst << std::endl; - OV_CPU_JIT_EMITTER_ASSERT(kernel, "Kernel hasn't been created"); if (std::getenv("REFERENCE")) { (*kernel)(&ctx); - std::cout << "Ref Repacked, KN = " << K * N << std::endl; - const auto* data = reinterpret_cast(dst); - for (size_t i = 0; i < K * N; ++i) { - std::cout << static_cast(data[i]) << "\t"; - } - std::cout << "\n"; } else { auto srcPtr = static_cast(src); auto dstPtr = const_cast(static_cast(dst)); - auto copySize = K * N * sizeof(bfloat16); cpu_memcpy(dstPtr, srcPtr, copySize); - std::cout << "Just copy, KN = " << K * N << std::endl; - const auto* data = reinterpret_cast(dst); - for (size_t i = 0; i < K * N; ++i) { - std::cout << static_cast(data[i]) << "\t"; - } - std::cout << "\n"; } } @@ -348,11 +323,7 @@ void BrgemmCopyBKernelExecutor::execute(const BrgemmCopyBKernelExecutor* executo auto kernel = executor->get_kernel(); OV_CPU_JIT_EMITTER_ASSERT(kernel, "has nullptr kernel"); OV_CPU_JIT_EMITTER_ASSERT(args, "has nullptr call args"); - auto s = args->src; - auto d = args->tr_src; - std::cerr << s << " : " << d << "\n"; (*kernel)(args); - std::cerr << "\n"; } } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/nodes/subgraph.cpp b/src/plugins/intel_cpu/src/nodes/subgraph.cpp index bee62fd4e0b548..791d028c67d00f 100644 --- a/src/plugins/intel_cpu/src/nodes/subgraph.cpp +++ b/src/plugins/intel_cpu/src/nodes/subgraph.cpp @@ -881,23 +881,6 @@ void Subgraph::execute(dnnl::stream strm) { repacked_memory->load(*srcMemPtrs[1]); if (!std::getenv("REFERENCE")) srcMemPtrs[1] = repacked_memory; - - // TODO: remove - const auto& input_shape = getSrcMemoryAtPort(0)->getDescPtr()->getShape().getStaticDims(); - const auto& b_shape = getSrcMemoryAtPort(1)->getDescPtr()->getShape().getStaticDims(); - const auto K = DnnlExtensionUtils::convertToDnnlDim(*input_shape.rbegin()); - const auto N = DnnlExtensionUtils::convertToDnnlDim(*b_shape.rbegin()); - auto* data = repacked_memory->getDataAs(); - std::cout << "Repacked, KN = " << K * N << std::endl; - auto upper_bound = repacked_memory->getSize(); - for (decltype(upper_bound) i = 0; i < upper_bound; ++i) { - std::cout << static_cast(data[i]) << "\t"; - if (static_cast(data[i]) == 5.21875f) { - // std::cout << "Stride is found: " << i << std::endl; - upper_bound = i + K * N; - } - } - std::cout << "\n"; } execPtr->exec(srcMemPtrs, dstMemPtrs); }