Skip to content
Snippets Groups Projects
Commit adbba737 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Fixed a bug in model P1 when using CPU tensor

parent 9fc12e63
No related branches found
No related tags found
No related merge requests found
......@@ -211,7 +211,8 @@ class QoSModelP1(IQoSModel):
assert self.baseline_tensor is not None
with_approxes = self.app.add_baseline_to_knobs(with_approxes)
delta_tensors = np.array(
[self.delta_tensors[op][knob] for op, knob in with_approxes.items()]
[self.delta_tensors[op][knob] for op, knob in with_approxes.items()],
dtype=np.object
)
ret = delta_tensors.sum() + self.baseline_tensor
return float(self.qos_metric(ret))
......
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