SWDEV-232428 - Push hostcall implementation to the device layer
This change unifies the hostcall implementation for all the backends, by pushing the common logic to the device layer. This is done by replacing the use of hsa_signal_t with device::Signal (a light wrapper around it). Change-Id: I7b6fca7930b5a0b199da5d85e2e048354cc04e7b
这个提交包含在:
1 父节点
c65be06c4c
当前提交
671778bdd3
13 个文件已更改
+234
-31
没有与搜索条件相匹配的文件
@@ -32,17 +32,18 @@
|
||||
|
||||
#include "vdi_common.hpp"
|
||||
#include "device/comgrctx.hpp"
|
||||
#include "device/devhostcall.hpp"
|
||||
#include "device/rocm/rocdevice.hpp"
|
||||
#include "device/rocm/rocblit.hpp"
|
||||
#include "device/rocm/rocvirtual.hpp"
|
||||
#include "device/rocm/rocprogram.hpp"
|
||||
#include "device/rocm/rocmemory.hpp"
|
||||
#include "device/rocm/rocglinterop.hpp"
|
||||
#include "device/rocm/rocsignal.hpp"
|
||||
#ifdef WITH_AMDGPU_PRO
|
||||
#include "pro/prodriver.hpp"
|
||||
#endif
|
||||
#include "platform/sampler.hpp"
|
||||
#include "rochostcall.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
@@ -2677,7 +2678,7 @@ void* Device::getOrCreateHostcallBuffer(hsa_queue_t* queue, bool coop_queue,
|
||||
} else {
|
||||
coopHostcallBuffer_ = buffer;
|
||||
}
|
||||
if (!enableHostcalls(buffer, numPackets)) {
|
||||
if (!enableHostcalls(*this, buffer, numPackets)) {
|
||||
ClPrint(amd::LOG_ERROR, amd::LOG_QUEUE, "Failed to register hostcall buffer %p with listener",
|
||||
buffer);
|
||||
return nullptr;
|
||||
@@ -2855,5 +2856,9 @@ void Device::getGlobalCUMask(std::string cuMaskStr) {
|
||||
}
|
||||
}
|
||||
|
||||
device::Signal* Device::createSignal() const {
|
||||
return new roc::Signal();
|
||||
}
|
||||
|
||||
} // namespace roc
|
||||
#endif // WITHOUT_HSA_BACKEND
|
||||
在新工单中引用
屏蔽一个用户