-
Notifications
You must be signed in to change notification settings - Fork 18
Developer's Guide
H. Joe Lee edited this page Apr 20, 2022
·
20 revisions
- Create a new directory under the
adapter
directory.
Data Placement Engine (DPE) is the heart of Hermes performance. Developers may want to replace the default engine using different optimization algorithms.
You can quickly check how DPE is tested.
This is the code that you need to modify.
If you look at the line 206 Status result;
in MinimizeIoTimePlacement(), the default value of result is always HERMES_SUCCESS
as defined in src/hermes_status.h.
The goal is to assemble placement schema for BLOBs.
for (size_t i {0}; i < num_blobs; ++i) {
PlacementSchema schema;
// schema will have results from your problem solver.
output.push_back(schema);
}
The -1
is for Placement Ratio constraint, which iterates 1 less than num_targets
.
const size_t total_constraints =
num_blobs + (num_targets * constraints_per_target) - 1;
- Replace the header file
#include "ortools/linear_solver/linear_solver.h"
. - Update CMakeLists.txt files to remove gortools dependendency.