KhronosGroup / SPIRV-Registry

SPIR-V specs
109 stars 72 forks source link

Description of float_controls2 bits Contract, Reassoc, Transform unclear #237

Closed gnl21 closed 6 months ago

gnl21 commented 7 months ago

From an internal report:

Would it be possible to adjust the wording here at some point? We have had some difficulty where it had not been properly understood that contracting, reassociating and transforming were conjunctive operations, i.e. an instruction is contracted with its operands, or reassociated with its operands, or transformed with its operands. Instead, it was thought that the instruction could be contracted, and its operands could be contracted too (somewhat independently). Perhaps it may read better with "with":

Allows a floating-point operation to be contracted with any operation(s) producing its operands.

Allows a floating-point operation to be reordered with respect to any operation(s) producing its operands, according to real-number associativity rules.

Allows a floating-point operation to be transformed with respect to any operations(s) producing its operands, according to real-number rules.

gnl21 commented 7 months ago

I think that when I wrote this I thought it was clear from context what was meant, but once this is pointed out it's hard to unsee. I think that the suggested wording is better and I'll open an MR to change it.