P4 to Git Change 2037301 by ssahasra@ssahasra-hip-vdi on 2019/11/26 22:42:25

SWDEV-204782 - introduce hostcall

	Hostcall is a service that allows a kernel to submit requests to the
	host using shared buffers, and block until a response is received. This
	will eventually replace the shared buffer currently used for printf, and
	repurposes the same hidden kernel argument.

	When the runtime launches a kernel that requires the hostcall service it
	performs the following actions:
	- Launch a hostcall listener thread if it is not already running.
	- Locate the hostcall buffer for the corresponding hardware queue, or
	  create a new one.
	- Register the new hostcall buffer with the listener thread.
	- Set the hostcall buffer pointer as an implicit argument to the kernel.

Affected files ...

... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/Makefile#21 edit
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/build/Makefile.hip_tests#31 edit
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/scripts/hip_hostcall_tests.txt#1 add
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/scripts/run_all_tests.sh#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#143 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rochostcall.cpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rochostcall.hpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#92 edit
This commit is contained in:
foreman
2019-11-26 22:44:29 -05:00
parent 904ccfebc6
commit 416f273e94
7 ha cambiato i file con 539 aggiunte e 3 eliminazioni
+6
Vedi File
@@ -746,6 +746,9 @@ static inline uint32_t GetOclArgumentTypeOCL(const KernelArgMD& lcArg, bool* isH
case ValueKind::HiddenPrintfBuffer:
*isHidden = true;
return amd::KernelParameterDescriptor::HiddenPrintfBuffer;
case ValueKind::HiddenHostcallBuffer:
*isHidden = true;
return amd::KernelParameterDescriptor::HiddenHostcallBuffer;
case ValueKind::HiddenDefaultQueue:
*isHidden = true;
return amd::KernelParameterDescriptor::HiddenDefaultQueue;
@@ -779,6 +782,9 @@ static inline uint32_t GetOclArgumentTypeOCL(const aclArgData* argInfo, bool* is
else if (strcmp(&argInfo->argStr[2], "printf_buffer") == 0) {
return amd::KernelParameterDescriptor::HiddenPrintfBuffer;
}
else if (strcmp(&argInfo->argStr[2], "hostcall_buffer") == 0) {
return amd::KernelParameterDescriptor::HiddenHostcallBuffer;
}
else if (strcmp(&argInfo->argStr[2], "vqueue_pointer") == 0) {
return amd::KernelParameterDescriptor::HiddenDefaultQueue;
}