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

Method Initialize

tensorflow/compiler/jit/mark_for_cuda_graph_mode_pass.cc:987–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

985}
986
987StatusOr<bool> MarkForCudaGraphModePassImpl::Initialize() {
988 TF_RET_CHECK(!initialized_ && !edges_contracted_ && !clusters_created_);
989 initialized_ = true;
990
991 TF_RETURN_IF_ERROR(FindCompilationCandidates());
992
993 if (compilation_candidates_.empty()) {
994 VLOG(2) << "No compilable candidates";
995 return false;
996 }
997
998 TF_ASSIGN_OR_RETURN(bool cycle_detection_graph_ok,
999 CreateCycleDetectionGraph(graph_, &cycles_graph_));
1000 if (!cycle_detection_graph_ok) {
1001 VLOG(2) << "Could not form cycle detection graph";
1002 return false;
1003 }
1004
1005 if (!debug_options_.ignore_deadness_checks) {
1006 TF_RETURN_IF_ERROR(DeadnessAnalysis::Run(*graph_, &deadness_analysis_));
1007 }
1008
1009 // Each compilation candidate belongs to a cluster. The cluster's
1010 // representative names the node in the 'cycles' graph that represents the
1011 // cluster.
1012 TF_RETURN_IF_ERROR(BuildInitialClusterSet());
1013 return true;
1014}
1015
1016template <typename FnTy>
1017StatusOr<bool> MarkForCudaGraphModePassImpl::ForEachEdgeInPostOrder(FnTy fn) {

Callers

nothing calls this directly

Calls 2

RunFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected