[Beignet] [PATCH OCL20] Runtime: Add new param_name to clGetProgramBuildInfo

Song, Ruiling ruiling.song at intel.com
Wed Apr 6 06:56:47 UTC 2016


Hi Xiuli,

I have made such modification in my local machine. I have just send it out to the mail list.
I think we need to make a small wrapper for interp_program_get_global_constant_size(program->opaque);
And I also add a minor check against is_built to make sure the program was built successfully.
What do you think?

Thanks!
Ruiling

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Xiuli Pan
> Sent: Tuesday, April 5, 2016 1:48 PM
> To: beignet at lists.freedesktop.org
> Cc: Pan, Xiuli <xiuli.pan at intel.com>
> Subject: [Beignet] [PATCH OCL20] Runtime: Add new param_name to
> clGetProgramBuildInfo
> 
> From: Pan Xiuli <xiuli.pan at intel.com>
> 
> Add CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE for api
> clGetProgramBuildInfo, return the constantset size from backend.
> 
> Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
> ---
>  src/cl_api.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/cl_api.c b/src/cl_api.c
> index 5697e34..74e2b72 100644
> --- a/src/cl_api.c
> +++ b/src/cl_api.c
> @@ -1522,6 +1522,9 @@ clGetProgramBuildInfo(cl_program             program,
>    }else if (param_name == CL_PROGRAM_BINARY_TYPE){
> 
>      FILL_GETINFO_RET (cl_uint, 1, &program->binary_type, CL_SUCCESS);
> +  }else if (param_name ==
> CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE){
> +    size_t tmp = interp_program_get_global_constant_size(program->opaque);
> +    FILL_GETINFO_RET (size_t, 1, &tmp, CL_SUCCESS);
>    } else {
>      return CL_INVALID_VALUE;
>    }
> --
> 2.5.0
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list