[Cfp-interest 2912] Re: Accuracy of Mathematical Functions

Vincenzo Innocente Vincenzo.Innocente at cern.ch
Wed Oct 11 02:47:27 PDT 2023



> On Oct 11, 2023, at 10:53 AM, Paul Zimmermann <Paul.Zimmermann at inria.fr> wrote:
> 
>> 
>> It would be interesting to show/see in the tables which single precision 
>> routines are coded internally with either some double precision arithmetic 
>> and/or use a double precision kernel.
> 
> this would be difficult to know for proprietary libraries, where the source
> code is not available.
> 
> 
One can look into the assembly (using perf record/report I even managed to look into oneAPi jitted code)

The best in my opinion is to use perf or similar on a loop that just call the function of interest (eventually for the argument of interest in case of various path:
the region of the code will immedialty show up.

perf can also be used just to count single and double precision intructions (on INTEL x86-64)
something like 
perf stat \
-e fp_arith_inst_retired.512b_packed_single -e fp_arith_inst_retired.512b_packed_double \
-e fp_arith_inst_retired.256b_packed_single -e fp_arith_inst_retired.256b_packed_double \
-e fp_arith_inst_retired.128b_packed_single -e fp_arith_inst_retired.128b_packed_double \
-e fp_arith_inst_retired.scalar_single -e fp_arith_inst_retired.scalar_double \
./a.out











More information about the Cfp-interest mailing list