Skip to content
Snippets Groups Projects
Commit 962d7481 authored by Hao Gao's avatar Hao Gao
Browse files

Fix for testing cost model on urchin

parent 55d1bf6a
No related branches found
No related tags found
No related merge requests found
......@@ -219,7 +219,7 @@ def train():
def test_cost_model_accuracy(calibration_params):
m, n, target_order, est_rel_interp_tolerance = 2, 3, 5, 0.01
m, n, target_order, est_rel_interp_tolerance = 10, 16, 5, 0.01
cost_model = CLQBXCostModel(queue, calibration_params)
lp_source_contructor = functools.partial(
......@@ -240,11 +240,25 @@ def test_cost_model_accuracy(calibration_params):
)
modeled_cost = expr.get_modeled_cost(queue, **context)
print(modeled_cost)
for key in modeled_cost:
modeled_cost_aggregate = {}
for stage in modeled_cost[key]:
modeled_cost_aggregate[stage] = cost_model.aggregate(modeled_cost[key][stage])
print(modeled_cost_aggregate)
timing_data = {}
expr.eval(queue, context, timing_data=timing_data)
print(timing_data)
for key in timing_data:
actual_time = {}
for stage in timing_data[key]:
actual_time[stage] = timing_data[key][stage]["wall_elapsed"]
print(actual_time)
def evaluate(calibration_params):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment