P4 to Git Change 1343852 by lmoriche@lmoriche_opencl_dev on 2016/11/21 00:55:02
SWDEV-106175 - [ROCm CQE][OCL][G] clGetKernelInfoAMD() returns 0 vgprs ("OCLOfflineCompilation" failed with compute-roc-master#1542)
- Disable ROCm offline devices
- Add roc::Device::loaderQueryHostAdress to retrieve the host address of a give kernel code handle.
- Extract usedSGPRs and usedVGPRs for the amd kernel code header.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_icd.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#17 edit
[ROCm/clr commit: 9fbdf64025]
Tento commit je obsažen v:
@@ -754,9 +754,20 @@ bool Kernel::init_LC()
|
||||
|
||||
workGroupInfo_.preferredSizeMultiple_ = wavefront_size;
|
||||
|
||||
workGroupInfo_.usedSGPRs_ = 0;
|
||||
const void* kernelHostPtr = nullptr;
|
||||
if (Device::loaderQueryHostAddress(
|
||||
reinterpret_cast<const void*>(kernelCodeHandle_), &kernelHostPtr
|
||||
) == HSA_STATUS_SUCCESS) {
|
||||
auto akc = reinterpret_cast<const amd_kernel_code_t*>(kernelHostPtr);
|
||||
workGroupInfo_.usedSGPRs_ = akc->wavefront_sgpr_count;
|
||||
workGroupInfo_.usedVGPRs_ = akc->workitem_vgpr_count;
|
||||
}
|
||||
else {
|
||||
workGroupInfo_.usedSGPRs_ = 0;
|
||||
workGroupInfo_.usedVGPRs_ = 0;
|
||||
}
|
||||
|
||||
workGroupInfo_.usedStackSize_ = 0;
|
||||
workGroupInfo_.usedVGPRs_ = 0;
|
||||
|
||||
workGroupInfo_.wavefrontPerSIMD_ =
|
||||
program_->dev().info().maxWorkItemSizes_[0] / wavefront_size;
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele