-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
planner: add rpc to preload scheduling decision
- Loading branch information
1 parent
18f6a46
commit e1b7266
Showing
9 changed files
with
109 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
#include <faabric/batch-scheduler/SchedulingDecision.h> | ||
#include <faabric/proto/faabric.pb.h> | ||
|
||
namespace faabric::util { | ||
faabric::PointToPointMappings ptpMappingsFromSchedulingDecision( | ||
std::shared_ptr<faabric::batch_scheduler::SchedulingDecision> decision); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ faabric_lib(util | |
logging.cpp | ||
memory.cpp | ||
network.cpp | ||
ptp.cpp | ||
queue.cpp | ||
random.cpp | ||
snapshot.cpp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <faabric/util/ptp.h> | ||
|
||
namespace faabric::util { | ||
faabric::PointToPointMappings ptpMappingsFromSchedulingDecision( | ||
std::shared_ptr<faabric::batch_scheduler::SchedulingDecision> decision) | ||
{ | ||
faabric::PointToPointMappings mappings; | ||
mappings.set_appid(decision->appId); | ||
mappings.set_groupid(decision->groupId); | ||
for (int i = 0; i < decision->hosts.size(); i++) { | ||
auto* mapping = mappings.add_mappings(); | ||
mapping->set_host(decision->hosts.at(i)); | ||
mapping->set_messageid(decision->messageIds.at(i)); | ||
mapping->set_appidx(decision->appIdxs.at(i)); | ||
mapping->set_groupidx(decision->groupIdxs.at(i)); | ||
} | ||
|
||
return mappings; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters