Skip to content

Commit

Permalink
tests: fix executeThreads call
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Jan 11, 2024
1 parent 8150392 commit 0f8f4eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/planner/PlannerClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ faabric::batch_scheduler::SchedulingDecision PlannerClient::callFunctions(
}

// To optimise for single-host shared memory, we can skip sending the
// snapshot to the planner by setting the singlehost flag
if (!req->singlehost()) {
// snapshot to the planner by setting the single host hint
// FIXME(async-snaps): ideally, snapshots would be synchornised
// _after_ the scheduling decision is made
if (!req->singlehosthint()) {
snapshotKey = faabric::util::getMainThreadSnapshotKey(firstMsg);
}
} else {
Expand Down
4 changes: 4 additions & 0 deletions src/scheduler/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ std::vector<std::pair<uint32_t, int32_t>> Executor::executeThreads(

// Perform snapshot updates if not on single host
if (!isSingleHost) {
// Add the diffs corresponding to this executor
auto diffs = mergeDirtyRegions(msg);
snap->queueDiffs(diffs);

// Write queued changes to snapshot
int nWritten = snap->writeQueuedDiffs();

Expand Down

0 comments on commit 0f8f4eb

Please sign in to comment.