Flops what is actually flop

I came from this topic: FLOPS Intel Core and testing it with C (innerproduct)

When I started writing simple test scripts, I had a few questions.

  • Why floating point? What is so important about the floating point we need to consider? Why not a simple int?

  • If I want to measure FLOPS, let's say I do the scalar product of two vectors. Should two vectors float []? How will the measurement be different if I use int []?

  • I am not familiar with Intel architectures. Let's say I have the following operations:

    float a = 3.14159; float b = 3.14158;
    for(int i = 0; i < 100; ++i) {
        a + b;
    }
    

    How many "floating point operations"?

  • I'm a little confused because I learned the simplified 32-bit MIPS architecture. There are 32 bits for each command, for example, 5 bits for operand 1 and 5 bits for operand 2, etc. Therefore, for the intel architecture (in particular, the same architecture from the previous stream) I was told that the register can contain 128 bits. For a SINGLE PRECISION floating point, 32 bits per floating point number, does this mean that for each instruction submitted to the processor, 4 floating point numbers may be required? Shouldn't we also consider bits associated with operands and other parts of the instruction? How can we just pass 4 floating point numbers to the CPU without any specific value?

I don't know if my approach to thinking about everything in pieces makes sense. If not, what “height” of perspective should I look at?

+3
9

1.) , . , ( , ), , .

2.) . CPU float, ( , float), .

3.) 100 , 100 , (100?) //. , , , , :)

4.) , , , , , . , :

|OP CODE | Operand 1 | Operand 2 | (among many, many others)

1 2 , . , . , SSE:

mulps      %%xmm3, %%xmm1

xmm3 xmm1 xmm3. 128- , 128- , . , x86 MIPS - , CISC. x86 1 16 (!) .

, , , , , , . , .

+3
  • , ( / , , , ). , , , , .

  • , . . № 1.

  • FLOP , , . 1 , 100 . : , , , , .

  • SIMD ( ) . SIMD- AltiVec ( PowerPC) MMX/SSE/... Intel x86 . , 100 , 25 . , , SIMD- ( ).

+3

​​.

http://www.webopedia.com/TERM/F/FLOPS.html

100 ( ). .

, -, , , , , , , Wikipedia, .

+1

1) , , (, ..) .

2) FLOPS .

3) 100.

4) ALU. 96-128 .

0

. , .

Intel 80- , 64- . SSE, 128- .

0
  • .
  • . .
  • 302, . .
  • x86 x64 MIPS. MIPS, RISC ( ), CISC ( ) Intel AMD. x86 , 16 ( , ).

128- . - - , , , .

fld  A      //st=[A]
fld  B      //st=[B, A]
Loop:
fld st(1)   //st=[A, B, A]
fadd st(1)  //st=[A + B, B, A]
fstp memory //st=[B, A]
0

Yuck, MIPS. , . "hennesy/patterson"?

MMX Pentium (586) Intel. , , SIMD, . Cray ( , ). SIMD . CUDA, NVIDIA DSP .

0
  • , , . " ".

  • float, double long double. , ints.

  • 100 . ( , , - .)

  • . , , 32- float 128- .

, , , "quants", . . - 1988 , 30 2009 2,5 № 123 Forbes 400 .

, !

0

1) , , . IEEE-754, , , , .

2) int, FLOPS. int, - float, int- > float, , , FLOP.

3/4) Intel . (). , , FPU, , FPU, , , , FPU .

- .

http://www.website.masmforum.com/tutorials/fptute/appen1.htm

, - Intel , .

0

Source: https://habr.com/ru/post/1719684/


All Articles