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
[ROCm/clr commit: 416f273e94]
This commit is contained in:
@@ -111,7 +111,8 @@ static const std::map<std::string,ValueKind> ArgValueKind =
|
||||
{"HiddenPrintfBuffer", ValueKind::HiddenPrintfBuffer},
|
||||
{"HiddenDefaultQueue", ValueKind::HiddenDefaultQueue},
|
||||
{"HiddenCompletionAction", ValueKind::HiddenCompletionAction},
|
||||
{"HiddenMultigridSyncArg", ValueKind::HiddenMultiGridSyncArg}
|
||||
{"HiddenMultigridSyncArg", ValueKind::HiddenMultiGridSyncArg},
|
||||
{"HiddenHostcallBuffer", ValueKind::HiddenHostcallBuffer},
|
||||
};
|
||||
|
||||
static const std::map<std::string,ValueType> ArgValueType =
|
||||
@@ -225,7 +226,8 @@ static const std::map<std::string,ValueKind> ArgValueKindV3 =
|
||||
{"hidden_printf_buffer", ValueKind::HiddenPrintfBuffer},
|
||||
{"hidden_default_queue", ValueKind::HiddenDefaultQueue},
|
||||
{"hidden_completion_action", ValueKind::HiddenCompletionAction},
|
||||
{"hidden_multigrid_sync_arg", ValueKind::HiddenMultiGridSyncArg}
|
||||
{"hidden_multigrid_sync_arg", ValueKind::HiddenMultiGridSyncArg},
|
||||
{"hidden_hostcall_buffer", ValueKind::HiddenHostcallBuffer},
|
||||
};
|
||||
|
||||
static const std::map<std::string,ValueType> ArgValueTypeV3 =
|
||||
@@ -320,7 +322,8 @@ struct KernelParameterDescriptor {
|
||||
ImageObject = 11,
|
||||
SamplerObject = 12,
|
||||
QueueObject = 13,
|
||||
HiddenMultiGridSync = 14
|
||||
HiddenMultiGridSync = 14,
|
||||
HiddenHostcallBuffer = 15,
|
||||
};
|
||||
clk_value_type_t type_; //!< The parameter's type
|
||||
size_t offset_; //!< Its offset in the parameter's stack
|
||||
|
||||
Reference in New Issue
Block a user