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

Allen Baum allen.baum at esperantotech.com
Sun Sep 8 18:55:55 BST 2019


It doesn’t matter whether someone else implements them or not. What matters is their cost (area, power, design time, validation),  and their benefit (primarily their effect on performance. )

E.g. tan can be replaced by sin/cos, which is cheap (if you already have sin and cos) and possibly only a little slower. The benefit may be totally trivial, and the cost ( delay in getting the product out, extra architects, validated, implementors) May be substantial.

And that’s why you do quantitative analysis.
You are basically assuming that someone has effectively  handed you that analysis- and that is not necessarily the case ( unless perhaps they are also handing you the design database as well for exactly the process you are designing for and you have exactly the same design constraints).

YMMV.


-Allen

> On Sep 8, 2019, at 7:56 AM, lkcl <luke.leighton at gmail.com> wrote:
> 
> https://gitlab.freedesktop.org/panfrost/mali-isa-docs/blob/master/Midgard.md
> 
> Transcendental opcodes in ARM's MALI ISA include
> 
> E8 - fatan_pt2
> F0 - frcp (reciprocal)
> F2 - frsqrt (inverse square root, 1/sqrt(x))
> F3 - fsqrt (square root)
> F4 - fexp2 (2^x)
> F5 - flog2
> F6 - fsin
> F7 - fcos
> F9 - fatan_pt1
> 
> pt1 stands for "pi times 1" and pt2 should br obvious.
> 
> NVIDIA CUDA transcendentals
> 
> https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#mathematical-functions-appendix
> 
> Further internal documentation is hard to find.
> 
> AMD VEGA
> 
> http://developer.amd.com/wordpress/media/2017/08/Vega_Shader_ISA_28July2017.pdf
> 
> sin, cos, exp, log, rcp, rsqrt, all in FP16/32/64.
> 
> Intesestingly no tan, atan, arc or hypot.
> 
> If these are standard opcodes in commercial GPUs, requesting specific and individual quantitative analysis is puzzling in the extreme. Their inclusion is so obviously critical for commercial success in the field of 3D and HPC that it is the equivalent of asking for quantitative analysis of "integer add" or "mul" for a DSP.
> 
> L.
> 
> -- 
> You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+unsubscribe at groups.riscv.org.
> To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/a84259e2-1acf-4ae5-ab80-6c332c77a6e6%40groups.riscv.org.



More information about the libre-riscv-dev mailing list