Kai Ruhl <[email protected]> writes:

> I have read up on floating precision and there might be an issue with
> rounding modes.
>
> https://developer.nvidia.com/content/precision-performance-floating-point-and-ieee-754-compliance-nvidia-gpus
>
> Of course this is rounding for float/double register results, not the
> round() function, but I can imagine the same circuitry being re-used. In
> a nutshell, there are 4 different rounding modes:
>
> - rn: round to nearest, ties to even
> - rz: round towards zero
> - ru: round towards +infty
> - rd: round towards -infty
>
> My round(88.9f) == 88.0 problem could occur when "rd" is active for some
> reason. And now my question: Is the rounding mode set somewhere in pyopencl?

Not to my knowledge. You could take a look at the generated PTX (by
looking at the OpenCL "binary") and see what the rounding mode actually is.

Andreas

Attachment: pgp3a1Y06NszF.pgp
Description: PGP signature

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to