MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Run

Method Run

tensorflow/core/graph/mkl_tfconversion_pass.cc:425–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425Status MklToTfConversionPass::Run(const GraphOptimizationPassOptions& options) {
426 if (options.graph == nullptr && options.partition_graphs == nullptr) {
427 return Status::OK();
428 }
429 if (DisableMKL()) {
430 VLOG(2) << "TF-MKL: Disabling MKL";
431 return Status::OK();
432 }
433
434 auto process_graph = [&](std::unique_ptr<Graph>* g) {
435 // Get the ownership of graph
436 std::unique_ptr<Graph>* ng = std::move(g);
437 RunPass(ng);
438 // Return the ownership of graph back
439 g->reset(ng->release());
440 };
441
442 if (kMklTfConvPassGroup != OptimizationPassRegistry::POST_PARTITIONING) {
443 // For any pre-partitioning phase, graph is stored in options.graph.
444 process_graph(options.graph);
445 } else {
446 // For post partitioning phase, graphs are stored in
447 // options.partition_graphs.
448 for (auto& pg : *options.partition_graphs) {
449 process_graph(&pg.second);
450 }
451 }
452
453 return Status::OK();
454}
455
456} // namespace tensorflow
457

Callers

nothing calls this directly

Calls 4

RunPassFunction · 0.85
DisableMKLFunction · 0.50
resetMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected