P4 to Git Change 1988234 by kjayapra@3_HIPWS_TXT_ROCM on 2019/08/23 12:12:45
SWDEV-201068 - Reverting back CL 1987582. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#37 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#84 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.hpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#98 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#96 edit
Tá an tiomantas seo le fáil i:
@@ -253,6 +253,8 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
||||
amd::NDRangeContainer ndrange(3, globalWorkOffset, globalWorkSize, localWorkSize);
|
||||
amd::Command::EventWaitList waitList;
|
||||
|
||||
address kernargs = nullptr;
|
||||
|
||||
// 'extra' is a struct that contains the following info: {
|
||||
// HIP_LAUNCH_PARAM_BUFFER_POINTER, kernargs,
|
||||
// HIP_LAUNCH_PARAM_BUFFER_SIZE, &kernargs_size,
|
||||
@@ -262,17 +264,19 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
||||
extra[2] != HIP_LAUNCH_PARAM_BUFFER_SIZE || extra[4] != HIP_LAUNCH_PARAM_END) {
|
||||
return hipErrorNotInitialized;
|
||||
}
|
||||
address kernargs = reinterpret_cast<address>(extra[1]);
|
||||
::memcpy(kernel->parameters().values(), kernargs, *(size_t*)(extra[3]));
|
||||
// assert(kernel->signature().paramsSize()>=reinterpret_cast<size_t>(extra[3]));
|
||||
kernargs = reinterpret_cast<address>(extra[1]);
|
||||
}
|
||||
|
||||
if (kernelParams != nullptr) {
|
||||
const amd::KernelSignature& signature = kernel->signature();
|
||||
for (size_t i = 0; i < signature.numParameters(); ++i) {
|
||||
const amd::KernelParameterDescriptor& desc = signature.at(i);
|
||||
if (kernelParams == nullptr) {
|
||||
assert(kernargs != nullptr);
|
||||
kernel->parameters().set(i, desc.size_, kernargs + desc.offset_,
|
||||
desc.type_ == T_POINTER/*svmBound*/);
|
||||
} else {
|
||||
assert(extra == nullptr);
|
||||
kernel->parameters().set(i, desc.size_, kernelParams[i], desc.type_ == T_POINTER);
|
||||
kernel->parameters().set(i, desc.size_, kernelParams[i], desc.type_ == T_POINTER/*svmBound*/);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +287,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
||||
}
|
||||
|
||||
amd::NDRangeKernelCommand* command = new amd::NDRangeKernelCommand(
|
||||
*queue, waitList, *kernel, ndrange, sharedMemBytes, params, true);
|
||||
*queue, waitList, *kernel, ndrange, sharedMemBytes, params);
|
||||
if (!command) {
|
||||
return hipErrorOutOfMemory;
|
||||
}
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir