Skip to content

-cl-unsafe-math-optimizations - is it merely an aggregate of three other named options? #1583

Description

@eyalroz

At: https://registry.khronos.org/OpenCL/specs/unified/html/OpenCL_API.html#compiler-options , as of version v3.1.1, Fri, 22 May 2026 12:00:00 +0000 , it says:

5.8.6.3. Optimization Options

...

-cl-unsafe-math-optimizations

Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid, (b) may violate the IEEE 754 standard, (c) assume relaxed OpenCL numerical compliance requirements as defined in the unsafe math optimization section of the OpenCL C or OpenCL SPIR-V Environment specifications, and (d) may violate edge case behavior in the OpenCL C or OpenCL SPIR-V Environment specifications. This option includes the -cl-no-signed-zeros, -cl-mad-enable, and -cl-denorms-are-zero options.

(emphasis mine.)

It is not clear whether -cl-unsafe-math-optimizations includes:

  1. only those three option, i.e. it's a shorthand for their combination, or
  2. any number of potential options, but always also those three.

please amend the wording to clarify.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions