diff --git a/.github/workflows/pr-development-workflow.yml b/.github/workflows/pr-development-workflow.yml index 5c43f2c..ab00aa8 100644 --- a/.github/workflows/pr-development-workflow.yml +++ b/.github/workflows/pr-development-workflow.yml @@ -55,6 +55,7 @@ jobs: echo "Creating coverage report..." ninja -C build coverage - uses: actions/upload-artifact@v4 + if: always() with: name: build-standard-${{ inputs.arch }} path: build/ diff --git a/examples/basic/basic.cpp b/examples/basic/basic.cpp index 576677f..2eda46d 100644 --- a/examples/basic/basic.cpp +++ b/examples/basic/basic.cpp @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) const auto isRoot = instanceManager->getCurrentInstance()->isRootInstance(); // Creating hLLM Engine object - hLLM::Engine hllm(instanceManager.get(), rpcEngine.get(), taskr.get()); + hLLM::Engine hllm(instanceManager.get(), workerComputeManager.get(), rpcEngine.get(), taskr.get()); // Deployment object, it dictates how the work will be distributed hLLM::configuration::Deployment deployment; diff --git a/extern/CloudR b/extern/CloudR index d8df57d..45ec347 160000 --- a/extern/CloudR +++ b/extern/CloudR @@ -1 +1 @@ -Subproject commit d8df57d878f00b230cd789bbd7e307505d668036 +Subproject commit 45ec3474725f4c59dd3a55db79c28d98b3d5b895 diff --git a/extern/HiCR b/extern/HiCR index 806da12..6eb59ea 160000 --- a/extern/HiCR +++ b/extern/HiCR @@ -1 +1 @@ -Subproject commit 806da1295c662f095204e4cc15170ae010dbaccb +Subproject commit 6eb59ea9e63461c847ec06a2dc7819ba41f509fc diff --git a/extern/TaskR b/extern/TaskR index ff6ed60..68f9ca6 160000 --- a/extern/TaskR +++ b/extern/TaskR @@ -1 +1 @@ -Subproject commit ff6ed60a81993a4617465ef65301a949e4033036 +Subproject commit 68f9ca6e7fde8443d2b23ab3421ba281755744e1 diff --git a/extern/cpp-httplib b/extern/cpp-httplib index 551f96d..806fcb8 160000 --- a/extern/cpp-httplib +++ b/extern/cpp-httplib @@ -1 +1 @@ -Subproject commit 551f96d4a2a07a56d72a13d4837b31eead884d34 +Subproject commit 806fcb82681195e330dda01d57e92a68b206b52b diff --git a/include/hllm/engine.hpp b/include/hllm/engine.hpp index 7f0dfc7..2c58376 100644 --- a/include/hllm/engine.hpp +++ b/include/hllm/engine.hpp @@ -26,27 +26,28 @@ class Engine final public: Engine(HiCR::InstanceManager *instanceManager, + HiCR::ComputeManager *computeManager, HiCR::frontend::RPCEngine *rpcEngine, taskr::Runtime *taskr, const HiCR::GlobalMemorySlot::tag_t exchangeTag = __HLLM_DEFAULT_EXCHANGE_TAG) : _instanceManager(instanceManager), + _computeManager(computeManager), _rpcEngine(rpcEngine), _taskr(taskr), _instanceId(_instanceManager->getCurrentInstance()->getId()), _exchangeTag(exchangeTag) { // Registering entry point function for partition coordinators / replicas. Not for the deployment launcher - _rpcEngine->addRPCTarget(__HLLM_WORKER_ENTRY_POINT_RPC_NAME, HiCR::backend::pthreads::ComputeManager::createExecutionUnit([this](void *) { entryPoint(); })); + _rpcEngine->addRPCTarget(__HLLM_WORKER_ENTRY_POINT_RPC_NAME, _computeManager->createExecutionUnit([this](void *) { entryPoint(); })); // Registering deployment information request - _rpcEngine->addRPCTarget(__HLLM_REQUEST_DEPLOYMENT_CONFIGURATION_RPC_NAME, - HiCR::backend::pthreads::ComputeManager::createExecutionUnit([this](void *) { attendDeploymentConfigurationRequest(); })); + _rpcEngine->addRPCTarget(__HLLM_REQUEST_DEPLOYMENT_CONFIGURATION_RPC_NAME, _computeManager->createExecutionUnit([this](void *) { attendDeploymentConfigurationRequest(); })); // Registering finalization function (for root to execute) - _rpcEngine->addRPCTarget(__HLLM_BROADCAST_DEPLOYMENT_STOP_RPC_NAME, HiCR::backend::pthreads::ComputeManager::createExecutionUnit([this](void *) { doLocalTermination(); })); + _rpcEngine->addRPCTarget(__HLLM_BROADCAST_DEPLOYMENT_STOP_RPC_NAME, _computeManager->createExecutionUnit([this](void *) { doLocalTermination(); })); // Registering finalization request function (for non-root to request roots to end the entire execution) - _rpcEngine->addRPCTarget(__HLLM_REQUEST_DEPLOYMENT_STOP_RPC_NAME, HiCR::backend::pthreads::ComputeManager::createExecutionUnit([this](void *) { broadcastTermination(); })); + _rpcEngine->addRPCTarget(__HLLM_REQUEST_DEPLOYMENT_STOP_RPC_NAME, _computeManager->createExecutionUnit([this](void *) { broadcastTermination(); })); } ~Engine() = default; @@ -313,7 +314,7 @@ class Engine final for (const auto &replicaRoleIndex : replicaRoleIndexes) { printf("[Instance %lu] I am a partition %lu replica %lu\n", _instanceId, replicaRoleIndex.first, replicaRoleIndex.second); - auto replicaRole = std::make_shared(_deployment, replicaRoleIndex.first, replicaRoleIndex.second, _taskr, _registeredFunctions); + auto replicaRole = std::make_shared(_deployment, replicaRoleIndex.first, replicaRoleIndex.second, _taskr, _computeManager, _registeredFunctions); // Storing role _instanceRoles.push_back(replicaRole); @@ -459,6 +460,9 @@ class Engine final // The instance manager to use for creating / relinquishing replicas HiCR::InstanceManager *const _instanceManager; + // The compute manager to use for creating execution units and registering RPC targets + HiCR::ComputeManager *const _computeManager; + // Pointer to the HiCR RPC Engine HiCR::frontend::RPCEngine *_rpcEngine; diff --git a/include/hllm/roles/partition/replica.hpp b/include/hllm/roles/partition/replica.hpp index 2dce52a..caf634f 100644 --- a/include/hllm/roles/partition/replica.hpp +++ b/include/hllm/roles/partition/replica.hpp @@ -28,6 +28,7 @@ class Replica final : public Base const configuration::Partition::partitionIndex_t partitionIdx, const configuration::Replica::replicaIndex_t replicaIdx, taskr::Runtime *const taskr, + HiCR::ComputeManager *const computeManager, const std::map ®isteredFunctions) : Base(deployment, partitionIdx, taskr), _replicaIdx(replicaIdx), @@ -62,7 +63,7 @@ class Replica final : public Base std::make_shared(*_controlEdgeConfig, edge::edgeType_t::replicaToCoordinator, edge::Base::controlEdgeIndex, _partitionIdx, _partitionIdx, _replicaIdx); // Creating general TaskR function for all execution graph tasks - _taskrFunction = std::make_unique([this](taskr::Task *task) { runTaskRFunction(task); }); + _taskrFunction = std::make_unique(computeManager, [this](taskr::Task *task) { runTaskRFunction(task); }); // Resetting label count _taskrLabelCounter = 0;