Questions tagged [flops]

FLOPS (FLoating point Operations Per Second): a unit of measurement used to quantify the performance of the implementation of a numerical algorithm.

Anything related to the FLOPS unit of measurement (FLoating point Operations Per Second), i.e. a unit of measurement used to quantify the performance of the implementation of a numerical algorithm.

See Wikipedia page on FLOPS.

132 questions
3
votes
3 answers

Really slow loop with vector-scalar multiplication in MATLAB

Have I done something wrong or is vector-by-scalar multiplication really so costly? Doesn't MATLAB (ver 2012a or higher) optimize the code somehow to prevent such curiosities? >> tic; for i=1:100000; x = sin(i)*[1; 1]; end; toc; Elapsed time is…
Przemek M
  • 55
  • 6
3
votes
1 answer

why are floating point operations considered expensive?

I read that gprof (function profiling) and other methods of profiling can return the number of floating point operations taking place in the execution of a program and thus was wondering how Flops are so much more expensive than regular operations?
Siddhartha
  • 4,296
  • 6
  • 44
  • 65
2
votes
0 answers

Calculating FLOPS for Keras Models (TF 2.x)

I found two solutions to calculate FLOPS of Keras models (TF 2.x): [1] https://github.com/tensorflow/tensorflow/issues/32809#issuecomment-849439287 [2] https://github.com/tensorflow/tensorflow/issues/32809#issuecomment-841975359 At first glance,…
2
votes
0 answers

Measure FLOPs from Numpy operations

Is there a general way of measuring how many floating-point operations a sequence of Numpy commands involves?—commands such as np.random.randint, np.sum, np.argmin, np.matmul or @, etc. Or is the only way to do it manually, thinking from a pure…
mic
  • 1,190
  • 1
  • 17
  • 29
2
votes
1 answer

Multiplying a vector and a Matrix with C problem

my code is : #define N 8000 static double A[N][N]; static double x[N], y[N]; void MyMatVec(double y[N], double A[N][N], double x[N], int n) { int i,j; for(i=0;i
WeMT
  • 33
  • 4
2
votes
1 answer

FLOPS assigned to sqrt in GPU to measure performance and global efficiency

In a GPU implementation we need to estimate its performance in terms of GLOPS. The code is very basic, but my problem is how many FLOPS should I give to the operations "sqrt" or "mad", whether 1 or more. Besides, I obtain 50 GFLOPS for my code if 1…
Open the way
  • 26,225
  • 51
  • 142
  • 196
2
votes
2 answers

What is the definition of Floating Point Operations ( FLOPs )

I'm trying to optimize my code with SIMD ( on ARM CPUs ), and want to know its arithmetic intensity (flops/byte, AI) and FLOPS. In order to calculate AI and FLOPS, I have to count the number of floating point operations(FLOPs). However, I can't find…
wanwan
  • 93
  • 10
2
votes
1 answer

Interpreting the FLOPs profile result of tensorflow

I want to profile the FLOPs of a very simple neural network model, which is used to classify the MNIST dataset, and the batch size is 128. As I followed the official tutorials, I got the result of the following model, but I cannot understand some…
ZK xxxxx
  • 33
  • 7
2
votes
1 answer

What is FLOPs calculated by tensorflow tf.profile?

Recently I use tf.profile to calculate FLOPs of ResNet-v1-50. I get 7084572224 (7.08 GFLOPs ?). But in original paper it is 3.8 GFLOPs. And I perform same on VGG-19 and get 5628853928 (56.29 GFLOPs?), but its real value is 19.6 billion FLOPs. Note…
Z Zheng
  • 48
  • 1
  • 6
2
votes
0 answers

How to get FLOPS in RISC-V using SW or HW method?

I am a newbie to RISC-V. I wonder how I could get FLOPS using SW or HW method. I try to use CSR to get FLOPS, but there are some problems. As I know, if I redesign the hpmcounter which counts every floating operation event, I could get FLOPS by…
Long
  • 21
  • 3
2
votes
1 answer

FLOP measurement

I'm trying to estimate FLOPS for my application using intel vtune Amplifier and I'm using this post here as a guideline : https://software.intel.com/en-us/articles/estimating-flops-using-event-based-sampling-ebs/ The problem is that I can't find the…
M_rr113
  • 29
  • 3
2
votes
1 answer

What all operations does FLOPS include?

FLOPS stands for FLoating-point Operations Per Second and I have some idea what Floating-point is. I want to know what these Operations are? Does +, -, *, / are the only operations or operations like taking logarithm(), exponential() are also…
pkj
  • 559
  • 1
  • 9
  • 21
2
votes
2 answers

Calculating FLops

I am writing a program to calculate the duration that my CPU take to do one "FLops". For that I wrote the code below before = clock(); y= 4.8; x= 2.3; z= 0; for (i = 0; i < MAX; ++i){ z=x*y+z; } printf("%1.20f\n", ( (clock()-before )/CLOCKS_PER_SEC…
Chaker
  • 1,197
  • 9
  • 22
2
votes
1 answer

Number of flops in Gaussian Elimination Matlab code

I am having a hard time trying to understand why this Matlab code to perform Gaussian Elimination without pivoting using LU factorization takes (2/3) * n^3 flops. (FLOPs: floating point operations and not FLOPS: floating point operations per…
2
votes
1 answer

Calculating GFlops

I'm wondering how would I calculate GFlops for a program of mine like, let's say, a CUDA application. Do I need to measure the execution time and the number of floating point operations in my code? If I had an operation like "logf", would it count…
Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
1 2
3
8 9