[Mesa-dev] [PATCH 1/2] clover: Return the minimum required value for CL_DEVICE_SINGLE_FP_CONFIG v2

Jan Vesely jan.vesely at rutgers.edu
Fri Mar 6 09:48:17 PST 2015


On Fri, 2015-03-06 at 15:53 +0000, Tom Stellard wrote:
> This means dropping CL_FP_DENORM from the current return value.
> 
> v2:
>   - Add comments about minimum values for OpenCL 1.2.
> ---
>  src/gallium/state_trackers/clover/api/device.cpp | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
> index b1f556f..b79997f 100644
> --- a/src/gallium/state_trackers/clover/api/device.cpp
> +++ b/src/gallium/state_trackers/clover/api/device.cpp
> @@ -201,8 +201,11 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
>        break;
>  
>     case CL_DEVICE_SINGLE_FP_CONFIG:
> +      // This is the "mandated minimum single precision floating-point
> +      // capability" for OpenCL 1.1.  In OpenCL 1.2, CL_FP_INF_NAN
> +      // is no longer required and nothing is required for custom devices.
I think Francisco's information was not entirely correct.
OpenCL 1.0, 1.1 minimum is INF_NAN | RTN for full profile (page 36, and
40, respectively)
OpenCL 1.2, 2.0 minimum is INF_NAN | RTN if not TYPE_CUSTOM for full
profile (pages 42, and 67, respectively)

OpenCL 1.0, 1.1, embedded profile minimum is RTZ or RTN
(pages 298, and 363)
OpenCL 1.2 2.0 embedded profile minimum is RTZ or RTN if not TYPE_CUSTOM
(pages 352, and 262)

sorry I did not catch the email yesterday.

jan

>        buf.as_scalar<cl_device_fp_config>() =
> -         CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST;
> +         CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST;
>        break;
>  
>     case CL_DEVICE_DOUBLE_FP_CONFIG:


-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150306/ba8ed10c/attachment.sig>


More information about the mesa-dev mailing list