modularized_scheduler.doxy 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*! \defgroup API_Modularized_Scheduler Modularized scheduler interface
  2. \struct starpu_sched_node
  3. \ingroup API_Modularized_Scheduler
  4. This structure represent a scheduler module.
  5. \var starpu_sched_node::push_task
  6. push a task in the scheduler module.
  7. \var starpu_sched_node::pop_task
  8. pop a task from the scheduler module, the task returned by this function is executable by the caller if its a worker
  9. \var starpu_sched_node::available
  10. notify workers downstairs that a task is waiting for a pop
  11. \var starpu_sched_node::estimated_load
  12. is an heuristic to compute load of scheduler module
  13. \var starpu_sched_node::estimated_execute_preds
  14. compute executions prediction for a task
  15. \var starpu_sched_node::nchilds
  16. the number of modules downstairs
  17. \var starpu_sched_node::childs
  18. modules downstairs
  19. \var starpu_sched_node::workers
  20. this member contain the set of underlaying workers
  21. \var starpu_sched_node::is_homogeneous
  22. this is set to true iff all underlaying workers are the same
  23. \var starpu_sched_node::data
  24. data used by the scheduler module
  25. \var starpu_sched_node::fathers
  26. the array of scheduler module above indexed by scheduling context index
  27. \var starpu_sched_node::init_data
  28. is called after all the scheduler is created and should init data member
  29. you can store things in node->data while calling _sched_node_create(arg)
  30. and use it with init_data
  31. \var starpu_sched_node::deinit_data
  32. is called just before starpu_sched_node_destroy
  33. \var starpu_sched_node::obj
  34. the hwloc object associed to scheduler module
  35. \struct starpu_task_execute_preds
  36. \ingroup API_Modularized_Scheduler
  37. this structure containt predictions for a task and is filled by starpu_sched_node::estimated_execute_preds
  38. \var starpu_task_execute_preds::state
  39. indicate status of prediction
  40. \var starpu_task_execute_preds::archtype
  41. \var starpu_task_execute_preds::impl
  42. those members are revelant is state is PERF_MODEL or CALIBRATING and is set to best or uncalibrated archtype and implementation, respectively, or suitable values if state is NO_PERF_MODEL
  43. \var starpu_task_execute_preds::expected_finish_time
  44. expected finish time of task
  45. \var starpu_task_execute_preds::expected_length
  46. expected compute time of task
  47. \var starpu_task_execute_preds::expected_transfer_length
  48. expected time for transfering data to worker's memory node
  49. \var starpu_task_execute_preds::expected_power
  50. expected power consumption for task
  51. \struct starpu_sched_tree
  52. \ingroup API_Modularized_Scheduler
  53. \var starpu_sched_tree::root
  54. this is the entry module of the scheduler
  55. \var starpu_sched_tree::workers
  56. this is the set of workers available in this context, this value is used to mask workers in modules
  57. \var lock
  58. this lock protect the worker member
  59. \fn struct starpu_sched_node * starpu_sched_node_create(void)
  60. allocate and initalise node field with defaults values :
  61. .pop_task make recursive call on father
  62. .available make a recursive call on childrens
  63. .estimated_load compute relative speedup and tasks in subtree
  64. .estimated_execute_preds return the average of recursive call on childs
  65. \fn void starpu_sched_node_destroy(struct starpu_sched_node * node)
  66. free data allocated by starpu_sched_node_create, but dont call node->deinit_data(node)
  67. \fn void starpu_sched_node_set_father(struct starpu_sched_node * node, struct starpu_sched_node * father_node, unsigned sched_ctx_id)
  68. set node->fathers[sched_ctx_id] to father_node
  69. \fn void starpu_sched_node_add_child(struct starpu_sched_node* node, struct starpu_sched_node * child)
  70. add child to node->childs and increment nchilds as well
  71. and dont modify child->fathers
  72. \fn void starpu_sched_node_remove_child(struct starpu_sched_node * node, struct starpu_sched_node * child)
  73. remove child from node->childs and decrement nchilds
  74. */