Skip to content

Commit 9acc43d

Browse files
committed
compute_comm_affinity
added test kl_bsp_cost more tests for max_comm_datastructure update update node affinity added test for affinity update test update affinity tests affinity tests update update small performance optimization more test, pre move data update pre_move_comm_data new unit test update test update tests update update update lambda container, bsp_cost function cost function correction max_comm_datastructures fix fix kl_bsp_cost test update update update update more tests update update comm update update update update update update update added more tests, cmpute working update comm affinity implemenation comm_affinity optimizations enable tests update test debug output update update update update unit tests passing cleaning update datastructure update update numa added mt test
1 parent 412437d commit 9acc43d

15 files changed

Lines changed: 4447 additions & 962 deletions

include/osp/auxiliary/io/hdag_graph_file_reader.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ limitations under the License.
2929
#include "osp/concepts/computational_dag_concept.hpp"
3030
#include "osp/graph_algorithms/directed_graph_util.hpp"
3131
#include "osp/auxiliary/io/filepath_checker.hpp"
32+
#include "osp/concepts/constructable_computational_dag_concept.hpp"
3233

3334
namespace osp {
3435
namespace file_reader {

include/osp/bsp/scheduler/LocalSearch/KernighanLin_v2/comm_cost_modules/kl_bsp_comm_cost.hpp

Lines changed: 553 additions & 122 deletions
Large diffs are not rendered by default.

include/osp/bsp/scheduler/LocalSearch/KernighanLin_v2/comm_cost_modules/kl_hyper_total_comm_cost.hpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ struct kl_hyper_total_comm_cost_function {
3232
using kl_gain_update_info = kl_update_info<VertexType>;
3333

3434
constexpr static unsigned window_range = 2 * window_size + 1;
35-
35+
constexpr static bool is_max_comm_cost_function = false;
36+
3637
kl_active_schedule<Graph_t, cost_t, MemoryConstraint_t> *active_schedule;
3738

3839
compatible_processor_range<Graph_t> *proc_range;
@@ -43,7 +44,7 @@ struct kl_hyper_total_comm_cost_function {
4344
cost_t comm_multiplier = 1;
4445
cost_t max_comm_weight = 0;
4546

46-
lambda_vector_container node_lambda_map;
47+
lambda_vector_container<VertexType> node_lambda_map;
4748

4849
inline cost_t get_comm_multiplier() { return comm_multiplier; }
4950
inline cost_t get_max_comm_weight() { return max_comm_weight; }
@@ -60,6 +61,12 @@ struct kl_hyper_total_comm_cost_function {
6061
node_lambda_map.initialize(graph->num_vertices(), instance->numberOfProcessors());
6162
}
6263

64+
struct empty_struct {};
65+
66+
using pre_move_comm_data_t = empty_struct;
67+
68+
inline empty_struct get_pre_move_comm_data(const kl_move& ) { return empty_struct(); }
69+
6370
cost_t compute_schedule_cost() {
6471
cost_t work_costs = 0;
6572
for (unsigned step = 0; step < active_schedule->num_steps(); step++) {

include/osp/bsp/scheduler/LocalSearch/KernighanLin_v2/comm_cost_modules/kl_total_comm_cost.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ struct kl_total_comm_cost_function {
2929
using kl_move = kl_move_struct<cost_t, VertexType>;
3030
using kl_gain_update_info = kl_update_info<VertexType>;
3131

32+
constexpr static bool is_max_comm_cost_function = false;
33+
3234
constexpr static unsigned window_range = 2 * window_size + 1;
3335
constexpr static bool use_node_communication_costs = use_node_communication_costs_arg || not has_edge_weights_v<Graph_t>;
3436

@@ -58,6 +60,10 @@ struct kl_total_comm_cost_function {
5860
comm_multiplier = 1.0 / instance->numberOfProcessors();
5961
}
6062

63+
struct empty_struct {};
64+
using pre_move_comm_data_t = empty_struct;
65+
inline empty_struct get_pre_move_comm_data(const kl_move& ) { return empty_struct(); }
66+
6167
cost_t compute_schedule_cost_test() {
6268
return compute_schedule_cost();
6369
}

0 commit comments

Comments
 (0)