Skip to content

Commit

Permalink
finalize look
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk committed Jan 10, 2025
1 parent fc38702 commit e397c92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,13 @@ class BrgemmBlocking : public snippets::lowered::pass::RangedPass, public Brgemm
ss << M << "," << N << "," << K << ",";
int64_t m_block, n_block, k_block;
std::tie(m_block, n_block, k_block) = get_blocking_params(brgemm_expr);
ss << static_cast<int64_t>(m_block) << "," << static_cast<int64_t>(n_block) << ","
<< static_cast<int64_t>(k_block) << ",";
ss << '\n';
ss << m_block << "," << n_block << "," << k_block;
std::string params = ss.str();
return params;
}
#endif // SNIPPETS_DEBUG_CAPS
};
} // namespace pass
} // namespace lowered
} // namespace snippets
} // namespace ov
} // namespace pass
} // namespace lowered
} // namespace snippets
} // namespace ov
9 changes: 7 additions & 2 deletions src/common/snippets/include/snippets/utils/params_dumper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ class ParamsDump {

private:
void dump(const std::string&& postfix) const {
ov::util::create_directory_recursive(debug_config.dumpParams.dir);

if (const auto brgemm = ov::as_type_ptr<snippets::op::Brgemm>(expr->get_node())) {
std::string csv_path = debug_config.dumpParams.dir + "/brgemm.csv";
std::ofstream csv_file(csv_path, std::ios_base::app);
OPENVINO_ASSERT(csv_file.is_open(), "Can't open file for dumping brgemm params");
static int brgemm_num = 0;
if (brgemm_num == 0) {
fprintf(stderr, "name,in_type,out_type,in_shapes,out_shapes,M,N,K,m_block,n_block,k_block\n");
csv_file << "name,in_type,out_type,in_shapes,out_shapes,M,N,K,m_block,n_block,k_block\n";
}
fprintf(stderr, "%s,%s", brgemm->get_friendly_name().c_str(), params.c_str());
csv_file << brgemm->get_friendly_name() << "," << params << "\n";

brgemm_num++;
}
Expand Down

0 comments on commit e397c92

Please sign in to comment.