SWDEV-232428 - PAL Hostcall support

Since the majority of the Hostcall implementation now sits in the
commmon layer, the PAL backend simply just needs to invoke it. One thing
that is missing though is HSA signal support.

The newly added pal::Signal class is a light emulaion of what HSA
signals provide. The current implementation is just enough to get
Hostcall working, but it can be expanded in the future if needed to
fully emulate HSA signals.

The major difference for now between PAL and ROCm hostcall
implemenations is that PAL doesn't support blocking signals. This will
be enabled in the near future. For now use active wait for PAL.

Change-Id: I746557354ab9d71a7d4a31f9320fcc2fee5aee7f
Tá an tiomantas seo le fáil i:
Vladislav Sytchenko tiomanta 2021-03-09 10:44:34 -05:00
1 tuismitheoir d9020e3416
tiomantas 99e8ac55cd
12 comhad athraithe
+232 -9

Níor tháinig aon chomhaid le do chuardach

+12
Féach ar an gComhad
@@ -349,6 +349,18 @@ hsa_kernel_dispatch_packet_t* HSAILKernel::loadArguments(VirtualGPU& gpu, const
WriteAqlArgAt(const_cast<address>(parameters), &bufferPtr, it.size_, it.offset_);
}
break;
case amd::KernelParameterDescriptor::HiddenHostcallBuffer:
if (amd::IS_HIP) {
auto buffer = gpu.getOrCreateHostcallBuffer();
if (!buffer) {
ClPrint(amd::LOG_ERROR, amd::LOG_KERN,
"Kernel expects a hostcall buffer, but none found");
return false;
}
assert(it.size_ == sizeof(buffer) && "check the sizes");
WriteAqlArgAt(const_cast<address>(parameters), &buffer, it.size_, it.offset_);
}
break;
case amd::KernelParameterDescriptor::HiddenDefaultQueue:
if (vmDefQueue != 0) {
WriteAqlArgAt(const_cast<address>(parameters), &vmDefQueue, it.size_, it.offset_);