Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#include "core/optimizer/graph_transformer.h"
 
using namespace ::onnxruntime::common;
 
namespace onnxruntime {
 
Status GraphTransformer::Apply(Graph& graph, bool& modified, const logging::Logger& logger) const {
  // the Graph should be in a good state prior this being called, so there should be no need to call Resolve here
  // ORT_RETURN_IF_ERROR(graph.Resolve());
 
  auto status = ApplyImpl(graph, modified, 0, logger);
  LOGS(logger, INFO) << "GraphTransformer " << Name() << " modified: " << modified << " with status: " << status;
  ORT_RETURN_IF_ERROR(status);
 
#if !defined(ORT_MINIMAL_BUILD)
  // At least currently, some transformers (InsertCastTransformer and MemcpyTransformer) need this to be called
  // after they complete to put the graph back into a valid state for the next transformer.
  if (modified) {
    status = graph.Resolve();
  }
#endif
 
  return status;
}
 
}  // namespace onnxruntime