Estimation

Interface

The interface that has to be implemented for an estimator.

ComputableDAGs.graph_costFunction
graph_cost(estimator::AbstractEstimator, graph::DAG)

Get the total estimated cost of the graph. The cost's data type can be chosen by the implementation, but must have a usable lessthan comparison operator (<), basic math operators (+, -) and an implementation of zero() and typemax().

source
ComputableDAGs.operation_effectMethod
operation_effect(estimator::AbstractEstimator, graph::DAG, operation::Operation)

Get the estimated effect on the cost of the graph, such that graph_cost(estimator, graph) + operation_effect(estimator, graph, operation) ~= graph_cost(estimator, graph_with_operation_applied). There is no hard requirement for this, but the better the estimate, the better an optimization algorithm will be.

Note

There is a default implementation of this function, applying the operation, calling graph_cost, then popping the operation again.

It can be much faster to overload this function for a specific estimator and directly compute the effects from the operation if possible.

source

Global Metric Estimator

Implementation of a global metric estimator. It uses the graph properties compute effort, data transfer, and compute intensity.

ComputableDAGs.CDCostType

CDCost

Representation of a DAG's cost as estimated by the GlobalMetricEstimator.

Fields:

.data: The total data transfer.
.computeEffort: The total compute effort.
.computeIntensity: The compute intensity, will always equal .computeEffort / .data.

Note

Note that the computeIntensity doesn't necessarily make sense in the context of only operation costs. It will still work as intended when adding/subtracting to/from a graph_cost estimate.

source