Browse Source

abandon using EXPERIMENTAL_DYNAMIC_PARTITION

tags/v1.2.0
lichun 3 years ago
parent
commit
4e391fe741
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      ge/graph/partition/dynamic_shape_partition.cc

+ 2
- 2
ge/graph/partition/dynamic_shape_partition.cc View File

@@ -48,7 +48,7 @@ namespace ge {
using Cluster = DynamicShapePartitioner::Cluster; using Cluster = DynamicShapePartitioner::Cluster;
using ClusterPtr = std::shared_ptr<Cluster>; using ClusterPtr = std::shared_ptr<Cluster>;


static bool IsContainResourceOp(const ComputeGraphPtr &root_graph) {
static bool IsInExperimentalMode(const ComputeGraphPtr &root_graph) {
for (const auto &node : root_graph->GetAllNodes()) { for (const auto &node : root_graph->GetAllNodes()) {
GE_CHECK_NOTNULL(node->GetOpDesc()); GE_CHECK_NOTNULL(node->GetOpDesc());
for (const auto &input_desc : node->GetOpDesc()->GetAllInputsDesc()) { for (const auto &input_desc : node->GetOpDesc()->GetAllInputsDesc()) {
@@ -83,7 +83,7 @@ static bool IsContainResourceOp(const ComputeGraphPtr &root_graph) {


Status DynamicShapePartitioner::Partition() { Status DynamicShapePartitioner::Partition() {
REQUIRE_NOT_NULL(root_graph_, "Graph is nullptr."); REQUIRE_NOT_NULL(root_graph_, "Graph is nullptr.");
if (!IsContainResourceOp(root_graph_)) {
if (!IsInExperimentalMode(root_graph_)) {
GELOGD("Skip dynamic shape partition as not in experimental mode."); GELOGD("Skip dynamic shape partition as not in experimental mode.");
REQUIRE(AttrUtils::SetBool(*root_graph_, ATTR_NAME_DYNAMIC_SHAPE_PARTITIONED, false), REQUIRE(AttrUtils::SetBool(*root_graph_, ATTR_NAME_DYNAMIC_SHAPE_PARTITIONED, false),
"Failed set dynamic shape partitioned flag on root graph."); "Failed set dynamic shape partitioned flag on root graph.");


Loading…
Cancel
Save