
Finally, the init_to_execute call, this is the one that populates the GraphTask::exec_info_ map in case that inputs were specified in the python backward call. It iterates the graph again, starting from the root, and records in the exec_info_ map the intermediate nodes needed to calculate only the given inputs gradients.
```c++
  // Queue the root
  if (skip_dummy_node) {
    InputBuffer input_buffer(roots.at(0).function->num_inputs());
    auto input = inputs.at(0);
input_buffer.add(roots.at(0).input_nr,
                  std::move(input),
                  input_stream,
                  opt_next_stream);

execute_with_graph_task(graph_task, graph_root, std::move(input_buffer));

} else {
    execute_with_graph_task(graph_task, graph_root, InputBuffer(variable_list()));
  }