[Mesa-dev] [PATCH] clover: Return the minimum required value for CL_DEVICE_SINGLE_FP_CONFIG
Francisco Jerez
currojerez at riseup.net
Thu Mar 5 10:42:25 PST 2015
Tom Stellard <thomas.stellard at amd.com> writes:
> This means dropping CL_FP_DENORM from the current return value.
> ---
> src/gallium/state_trackers/clover/api/device.cpp | 4 +++-
> 1 file changed, 3 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..db3b931 100644
> --- a/src/gallium/state_trackers/clover/api/device.cpp
> +++ b/src/gallium/state_trackers/clover/api/device.cpp
> @@ -201,8 +201,10 @@ 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"
Could you add that this is according to the OpenCL 1.1 specification?
OpenCL 1.2 is even weaker (CL_FP_INF_NAN is not required, only one of
CL_FP_ROUND_TO_ZERO or CL_FP_ROUND_TO_NEAREST is required, and no FP
capabilities at all are required for custom devices as Jan pointed out).
> 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;
I'm okay with this change, but I'm curious, is this motivated by your
architecture not supporting denorms?
> break;
>
> case CL_DEVICE_DOUBLE_FP_CONFIG:
> --
> 2.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150305/acd18420/attachment.sig>
More information about the mesa-dev
mailing list