diff --git a/bin/compile-model/src/compile-model/main.cc b/bin/compile-model/src/compile-model/main.cc index bade3c7169..8ada7323f6 100644 --- a/bin/compile-model/src/compile-model/main.cc +++ b/bin/compile-model/src/compile-model/main.cc @@ -239,9 +239,6 @@ int main(int argc, char **argv) { return from_v1(cg_json.get()); }(); - MachineSpecification machine_specification = - get_machine_specification(machine_specification_json_path); - MappedParallelComputationGraph mpcg = [&]() { if (strategy == "passthrough") { return lift_cg_to_mpcg_for_single_device(cg); @@ -249,6 +246,8 @@ int main(int argc, char **argv) { // Need to root this on the stack so it stays alive for the whole session std::optional managed_handle = create_device_handle(cpu); + MachineSpecification machine_specification = + get_machine_specification(machine_specification_json_path); CostEstimator estimator = create_cost_estimator(machine_specification, cpu, managed_handle); AlgorithmConfig algorithm =