Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Faabric #531

Merged
merged 3 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion faabric
Submodule faabric updated 43 files
+6 −0 CMakeLists.txt
+11 −7 dist-test/dev_server.sh
+5 −1 docs/development.md
+1 −2 include/faabric/scheduler/FunctionCallApi.h
+1 −4 include/faabric/scheduler/FunctionCallClient.h
+32 −19 include/faabric/scheduler/Scheduler.h
+3 −3 include/faabric/snapshot/SnapshotClient.h
+4 −0 include/faabric/snapshot/SnapshotServer.h
+4 −3 include/faabric/transport/MessageEndpoint.h
+83 −13 include/faabric/transport/PointToPointBroker.h
+5 −1 include/faabric/transport/PointToPointCall.h
+22 −0 include/faabric/transport/PointToPointClient.h
+8 −0 include/faabric/transport/PointToPointServer.h
+12 −3 include/faabric/util/scheduling.h
+19 −0 include/faabric/util/string_tools.h
+2 −0 src/flat/faabric.fbs
+30 −18 src/proto/faabric.proto
+3 −4 src/scheduler/CMakeLists.txt
+3 −3 src/scheduler/Executor.cpp
+2 −1 src/scheduler/FunctionCallClient.cpp
+14 −5 src/scheduler/Scheduler.cpp
+4 −2 src/snapshot/SnapshotClient.cpp
+29 −2 src/snapshot/SnapshotServer.cpp
+7 −2 src/transport/MessageEndpoint.cpp
+348 −74 src/transport/PointToPointBroker.cpp
+85 −0 src/transport/PointToPointClient.cpp
+47 −2 src/transport/PointToPointServer.cpp
+1 −0 src/util/latch.cpp
+9 −5 src/util/scheduling.cpp
+3 −2 tests/dist/scheduler/functions.cpp
+4 −3 tests/dist/scheduler/test_funcs.cpp
+4 −0 tests/dist/server.cpp
+274 −7 tests/dist/transport/functions.cpp
+49 −18 tests/dist/transport/test_point_to_point.cpp
+5 −4 tests/test/scheduler/test_executor.cpp
+9 −1 tests/test/scheduler/test_function_client_server.cpp
+124 −8 tests/test/scheduler/test_scheduler.cpp
+36 −7 tests/test/snapshot/test_snapshot_client_server.cpp
+167 −65 tests/test/transport/test_point_to_point.cpp
+333 −0 tests/test/transport/test_point_to_point_groups.cpp
+20 −10 tests/test/util/test_scheduling.cpp
+13 −0 tests/test/util/test_strings.cpp
+19 −0 tests/utils/fixtures.h
8 changes: 4 additions & 4 deletions src/threads/ThreadState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,14 @@ void Level::unlockCritical()
int Level::getLocalThreadNum(faabric::Message* msg)
{
if (depth == 0) {
return msg->appindex();
return msg->appidx();
}

int localThreadNum = msg->appindex() - globalTidOffset;
int localThreadNum = msg->appidx() - globalTidOffset;

if (localThreadNum < 0) {
SPDLOG_ERROR("Local thread num negative: {} - {} @ {}",
msg->appindex(),
msg->appidx(),
globalTidOffset,
depth);

Expand All @@ -315,7 +315,7 @@ int Level::getGlobalThreadNum(int localThreadNum)

int Level::getGlobalThreadNum(faabric::Message* msg)
{
return msg->appindex();
return msg->appidx();
}

std::string Level::toString()
Expand Down
2 changes: 1 addition & 1 deletion src/wasm/WasmModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ int WasmModule::awaitPthreadCall(const faabric::Message* msg, int pthreadPtr)

// Assign a thread ID and increment. Our pthread IDs start
// at 1
m.set_appindex(i + 1);
m.set_appidx(i + 1);

// Record this thread -> call ID
SPDLOG_TRACE(
Expand Down
2 changes: 1 addition & 1 deletion src/wavm/WAVMWasmModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ int32_t WAVMWasmModule::executeOMPThread(int threadPoolIdx,
// Set up function args
std::shared_ptr<threads::Level> ompLevel = threads::getCurrentOpenMPLevel();
int argc = ompLevel->nSharedVarOffsets;
std::vector<IR::UntaggedValue> invokeArgs = { msg.appindex(), argc };
std::vector<IR::UntaggedValue> invokeArgs = { msg.appidx(), argc };
for (int argIdx = 0; argIdx < argc; argIdx++) {
invokeArgs.emplace_back(ompLevel->sharedVarOffsets[argIdx]);
}
Expand Down
4 changes: 2 additions & 2 deletions src/wavm/openmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ WAVM_DEFINE_INTRINSIC_FUNCTION(env,
call.set_funcptr(microtaskPtr);

// OpenMP thread number
call.set_appindex(nextLevel->getGlobalThreadNum(i + 1));
call.set_appidx(nextLevel->getGlobalThreadNum(i + 1));
}

// Submit the request
Expand All @@ -456,7 +456,7 @@ WAVM_DEFINE_INTRINSIC_FUNCTION(env,
{
faabric::Message masterMsg = faabric::util::messageFactory(
parentCall->user(), parentCall->function());
masterMsg.set_appindex(nextLevel->getGlobalThreadNum(0));
masterMsg.set_appidx(nextLevel->getGlobalThreadNum(0));

IR::UntaggedValue masterThreadResult;

Expand Down