[libre-riscv-dev] [isa-dev] Re: FP transcendentals (trigonometry, root/exp/log) proposal

lkcl luke.leighton at gmail.com
Fri Aug 9 12:55:16 BST 2019


On Friday, August 9, 2019 at 6:11:04 PM UTC+8, lkcl wrote:

> So i'm really sorry, but a "quantitative" analysis of a near-exact replica of the Kronos OpenCL opcodes is misleading, pointless, and a hopeless waste of everybody's time.

By contrast, one of our sponsors had a user ask, "hey POSITs are up and coming, and have greater accuracy. how about including them?"

I had to sheepishly and diplomatically explain to them that adoption of POSITs in hardware is just the start. With no Industry-standard adoption, as coalesced in the Khronos Vulkan API, it would be five man-years of effort, at the end of which *there would still be no user adoption*.

The reason is simple: shader engines are already compiled into SPIRV that meet the Vulkan Specification.

If POSITs are not part of that spec, the hardware don't get used, period.

Now, did you see, anywhere in this thread, any mention of a proposal to include POSITs? Answer: no, because (being undiplomatic) it's a waste of time.

I did not waste anyone's time even mentioning it because we *already did the analysis*.

By contrast, early in the thread, we began to do an analysis of which operations could be implemented in terms of others. ATAN2 can be used to implement ATAN by setting y=1.0 and LOGP1 can be used to implement LOG and give better accuracy anyway.

Hypotenuse likewise was pointed out kindly by Mitch as being very straightforward to implement in terms of ln and sqrt however for really high performance applications the extra clock cycles may not be acceptable, so there is a Zhypot extension that lists them.

These decisions are the kinds that simply apply standard RISC ISA development rules, and will need careful review before finalising.

The actual set of opcodes themselves, there is simply no doubt at all that they are easily justifiable, as the level of adoption worldwide as Industry Standards as defined by the Khronos Group *unquestionably* proves their worth.

Now, unfortunately, because of the "giving up" wording, I have to use specific language here, in case the conversation ends. "If we do not hear otherwise, we will ASSUME that the above is reasonable, and that the approach being taken IN GOOD FAITH is acceptable for a Z RISC-V standard".

Apologies, I have to say that. It leaves the ball in the RISCV Foundation's court, should there be no further response, leading to prejudicial DELAY in our progress. You will have seen the forbes article by now, so will understand why it is becomes necessary to use this wording.

L.


More information about the libre-riscv-dev mailing list