Skip to content

Commit 78cb270

Browse files
committed
Fix graph partitioner when two MLIROp instances go side-by-side. Fix in return statement in is_dubug function.
1 parent c793696 commit 78cb270

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/common/transformations/src/transformations/mlir/convert_common.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace ov {
6262
namespace mlir {
6363

6464
bool is_debug() {
65-
util::getenv_bool("OV_MLIR_DEBUG", false);
65+
return util::getenv_bool("OV_MLIR_DEBUG", false);
6666
}
6767

6868
Location createLayerLocation(MLIRContext* ctx, const std::string& layerName, const std::string& layerType) {

src/common/transformations/src/transformations/mlir/subgraph_tracker.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ void SubgraphTracker::set_dependencies(NodePtr node, const Dependencies& depende
116116
// set/get subgraph id that a give node belongs to
117117

118118
SubgraphID SubgraphTracker::get_subgraph_id(NodePtr node) {
119-
auto id = node->get_rt_info().at("__subgraph_id").as<SubgraphID>();
119+
const auto& rti = node->get_rt_info();
120+
if(!rti.count("__subgraph_id")) {
121+
return nullptr;
122+
}
123+
auto id = rti.at("__subgraph_id").as<SubgraphID>();
120124
if(id) {
121125
id = ov::symbol::ancestor_of(id);
122126
}

0 commit comments

Comments
 (0)