Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculating FLOPS (Floating-point Operations per Seconds)

Tags:

c++

c

cuda

gdb

gpu

How can I calculate FLOPS of my application? If I have the total number of executed instructions, I can divide it by the execution time. But, how to count the number of executed instructions?

My question is general and answer for any language is highly appreciated. But I am looking to find a solution for my application which is developed by C/C++ and CUDA.

I do not know whether the tags are proper, please correct me if I am wrong.

like image 811
lashgar Avatar asked Sep 30 '12 09:09

lashgar


People also ask

How do you calculate flops per second?

Traditionally, the FLOPS of a microprocessor could be calculated using the following equation: FLOPS Subscript core Baseline equals StartFraction FLOPs Over cycle EndFraction times StartFraction cycles Over second EndFraction.

How do you calculate number of FLOPS?

Imagine doing it all by hand with a calculator. Every time you hit +, -, * or / you're doing a FLOP. So for example, y=8*x(1:10) would boil down to multiplying each of the 10 elements in x by 8. That'd be 10 FLOPs.

How many floating point operations per second FLOPS is your computer capable of?

ExaFLOPS. A 1 exaFLOPS (EFLOPS) computer system is capable of performing one quintillion (1018) floating-point operations per second. The rate 1 EFLOPS is equivalent to 1,000 PFLOPS.

What meant by floating point operations per second?

In computing, floating point operations per second (FLOPS, flops or flop/s) is a measure of computer performance, useful in fields of scientific computations that require floating-point calculations. For such cases, it is a more accurate measure than measuring instructions per second.


1 Answers

What I do if the number of floating point operations is not easily modeled is to produce two executables: One that is the production version and gives me the execution time, and an instrumented one that counts all floating point operations while performing them (surely that will be slow, but that doesn't matter for our purpose). Then I can compute the FLOP/s value by dividing the number of floating point ops from the second executable by the time from the first one.

This could probably even be automated, but I haven't had a need for this so far.

like image 70
tera Avatar answered Sep 30 '22 01:09

tera