12 using Phase = ComputeGraphPhase;
13 using PhaseAction = std::function<void()>;
14 using CaptureAction = std::function<void(cudaStream_t)>;
17 static Phase current_phase();
18 static void capture(CaptureAction&& cap);
19 static void capture(std::string_view name, CaptureAction&& cap);
20 static bool is_phase_none();
21 static bool is_phase_serial_launching();
22 static bool is_topo_building();
23 static bool is_building();
25 static bool is_direct_launching();
26 static bool is_caturing();
49 static void invoke_phase_actions(PhaseAction&& do_when_direct_launch,
50 PhaseAction&& do_when_set_node,
51 PhaseAction&& do_when_topo_building_set_node);
65 static void invoke_phase_actions(PhaseAction&& do_when_direct_launch,
66 PhaseAction&& do_when_set_node);
76 static void invoke_phase_actions(PhaseAction&& do_in_every_phase);
84 static auto current_graph() {
return instance().m_current_graph; }