|
|
|
@ -48,7 +48,7 @@ namespace ge {
|
|
|
|
|
using Cluster = DynamicShapePartitioner::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()) {
|
|
|
|
|
GE_CHECK_NOTNULL(node->GetOpDesc());
|
|
|
|
|
for (const auto &input_desc : node->GetOpDesc()->GetAllInputsDesc()) {
|
|
|
|
@ -83,7 +83,7 @@ static bool IsContainResourceOp(const ComputeGraphPtr &root_graph) {
|
|
|
|
|
|
|
|
|
|
Status DynamicShapePartitioner::Partition() {
|
|
|
|
|
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.");
|
|
|
|
|
REQUIRE(AttrUtils::SetBool(*root_graph_, ATTR_NAME_DYNAMIC_SHAPE_PARTITIONED, false),
|
|
|
|
|
"Failed set dynamic shape partitioned flag on root graph.");
|
|
|
|
|