P4 to Git Change 1249491 by gandryey@gera-w8 on 2016/03/21 17:37:48

SWDEV-90408 - OpenCL runtime crashes when querying CL_PROGRAM_NUM_KERNELS on a program built with clCompileProgram
	- The app attempts to get query before build/link call. Make sure symbols are available.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_program.cpp#40 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#39 edit


[ROCm/clr commit: c2b98ee500]
This commit is contained in:
foreman
2016-03-21 17:51:06 -04:00
والد 4c9bdf32a3
کامیت 40bbefd3aa
@@ -1049,6 +1049,9 @@ RUNTIME_ENTRY(cl_int, clGetProgramInfo, (
return CL_SUCCESS;
}
case CL_PROGRAM_NUM_KERNELS: {
if (as_amd(program)->symbolsPtr() == NULL) {
return CL_INVALID_PROGRAM_EXECUTABLE;
}
size_t numKernels = as_amd(program)->symbols().size();
return amd::clGetInfo(
numKernels, param_value_size, param_value, param_value_size_ret);