Jump to content

What exactly is AVX and do I need it?

Go to solution Solved by Zodiark1593,

AVX is an extension to x86 that allows a (quite drastic) speed up in certain floating point operations. AVX will primarily impact media transcoding where it is used in a home server. As just a streaming box, there will be no impact.

I want to build a media streaming pc (for like 350 euro) for my living room and I was looking into the G4560 chip because it seems like the most VFM thing right now.
But when I took a closer look reviewers mentioned that it doesn't have AVX (compared to the i3) but that it doesn't affect gamers (I don't care about that.)
So I looked up AVX and I couldn't exactly understand what it's meant for and I need you guys to explain it to me and tell me if there is any chance I will need it in the future.
Thank you in advance.

P.S. I don't need a GPU for this PC right?

Link to comment
Share on other sites

Link to post
Share on other sites

AVX is an extension to x86 that allows a (quite drastic) speed up in certain floating point operations. AVX will primarily impact media transcoding where it is used in a home server. As just a streaming box, there will be no impact.

My eyes see the past…

My camera lens sees the present…

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Qifsharmonika said:

I want to build a media streaming pc (for like 350 euro) for my living room and I was looking into the G4560 chip because it seems like the most VFM thing right now.
But when I took a closer look reviewers mentioned that it doesn't have AVX (compared to the i3) but that it doesn't affect gamers (I don't care about that.)
So I looked up AVX and I couldn't exactly understand what it's meant for and I need you guys to explain it to me and tell me if there is any chance I will need it in the future.
Thank you in advance.

Basically it's a set of instructions that programmers can use that allow a CPU to process vectorizable calculations really fast, but it uses all of the CPU's power. There's also AVX2 and AVX512 (latest).

 

You wouldn't see much use out of it in gaming (At least until devs / the game engines start using it), but you will notice if a video encoder or renderer uses AVX. the difference is quite different. AMD isn't so great on AVX, so there are cases were you would consider Intel if you have programs that rely on AVX a lot.

Link to comment
Share on other sites

Link to post
Share on other sites

AVX is an instruction set extension, like MMX , SSE , FMA and so on.

 

Basically, if the instructions are supported by the processor, a software can use them to do some things faster compared to using other processor instructions. 

 

For example, let's say you want to add two numbers and put the result somewhere .. and now let's say you have to do 100 such calculations ( you have 100 sets of two numbers).

Your software could put the two numbers in memory somewhere and use a processor instruction and then save the result somewhere, and this would take 3 cpu cycles (3 hz out of billions).

With AVX, the software could put let's say two chunks of 32 numbers somewhere in memory and use an instruction from the AVX set to say "for all numbers in the set, take one number at a time from each set and add them together and put the result in this other set" ... and instead of using 3 cycles for each addition, now the processor uses 50-60 cycles to do all 32 numbers.. so much faster than doing one pair at a time.

 

For some real world example.. AVX can help with encoding videos and decoding, because a lot of instructions in the AVX set work on 512 bit wide values, which just so happens to be the amount of bits you'd have in a 8 by 8 pixel square ( 8 x 8 = 64 pixels x 8 bits in a pixel = 512 bits) 

So the encoder or decoder can put the data for the whole 64 pixels and execute the instruction to do something on those 64 pixels in one shot, instead of using SSE or other instructions to repeatedly process just 8 or 16 pixels at a time at best.

So basically AVX would speed up encoding or decoding a bit... but if the processor doesn't have these instructions it wouldn't be the end of the world.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, mariushm said:

AVX is an instruction set extension, like MMX , SSE , FMA and so on.

 

Basically, if the instructions are supported by the processor, a software can use them to do some things faster compared to using other processor instructions. 

 

For example, let's say you want to add two numbers and put the result somewhere .. and now let's say you have to do 100 such calculations ( you have 100 sets of two numbers).

Your software could put the two numbers in memory somewhere and use a processor instruction and then save the result somewhere, and this would take 3 cpu cycles (3 hz out of billions).

With AVX, the software could put let's say two chunks of 32 numbers somewhere in memory and use an instruction from the AVX set to say "for all numbers in the set, take one number at a time from each set and add them together and put the result in this other set" ... and instead of using 3 cycles for each addition, now the processor uses 50-60 cycles to do all 32 numbers.. so much faster than doing one pair at a time.

 

For some real world example.. AVX can help with encoding videos and decoding, because a lot of instructions in the AVX set work on 512 bit wide values, which just so happens to be the amount of bits you'd have in a 8 by 8 pixel square ( 8 x 8 = 64 pixels x 8 bits in a pixel = 512 bits) 

So the encoder or decoder can put the data for the whole 64 pixels and execute the instruction to do something on those 64 pixels in one shot, instead of using SSE or other instructions to repeatedly process just 8 or 16 pixels at a time at best.

So basically AVX would speed up encoding or decoding a bit... but if the processor doesn't have these instructions it wouldn't be the end of the world.

Is there a LTT or TechQuickie video of this?

Edit: Maybe we should get them to make it.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Qifsharmonika said:

Is there a LTT or TechQuickie video of this?

Edit: Maybe we should get them to make it.

It is kind of an advanced subject (and only really makes sense if you know how CPUs work / programming).

 

I got into it as a programmer because I wanted to try my hand at making AVX make my programs faster. As stated above though, not everything can be vectorized. Also, CPU clocks tend to drop when encountering AVX because it places full load on the CPU (You're using the full CPU instead of just parts of it with the smaller instructions)

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, scottyseng said:

It is kind of an advanced subject (and only really makes sense if you know how CPUs work / programming).

 

I got into it as a programmer because I wanted to try my hand at making AVX make my programs faster. As stated above though, not everything can be vectorized. Also, CPU clocks tend to drop when encountering AVX because it places full load on the CPU (You're using the full CPU instead of just parts of it with the smaller instructions)

I thought that maybe since the G4560 is worth it over the i3 counterpart (in gaming) some people would have the same question as me when they hear that it doesn't have AVX.

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Qifsharmonika said:

Is there a LTT or TechQuickie video of this?

Edit: Maybe we should get them to make it.

The number of people who actually need AVX is rather small, a tech quickie on the subject won't be useful for most people. Programs which can use it are written to detect if the CPU has the capability to run the instruction, otherwise a less efficient instruction will be used for the calculation. AVX is not useful for most computations, although the things it is good for can dramatically improve performance.

If you need AVX, it is most likely that you are working on something that requires a rather powerful CPU anyway and will be looking at high end or server hardware.

Link to comment
Share on other sites

Link to post
Share on other sites

57 minutes ago, scottyseng said:

It is kind of an advanced subject (and only really makes sense if you know how CPUs work / programming).

 

I got into it as a programmer because I wanted to try my hand at making AVX make my programs faster. As stated above though, not everything can be vectorized. Also, CPU clocks tend to drop when encountering AVX because it places full load on the CPU (You're using the full CPU instead of just parts of it with the smaller instructions)

I'm not a programmer, but I like to know how things work, even if I put that knowledge to no useful application. 

Edited by Zodiark1593
Phone has been doubling words lately.

My eyes see the past…

My camera lens sees the present…

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Zodiark1593 said:

I'm not a programmer, but I like to know how things workwork, even if I put that knowledge to no useful application. 

Yeah, I was like that too before I changed my college major. I kind of got sucked into technology even more.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, scottyseng said:

Yeah, I was like that too before I changed my college major. I kind of got sucked into technology even more.

I know a lot about many different fields. I'm reasonably confident that if I choose to do so, there isn't much that I wouldn't succeed in. However, I don't have any sort of goal or purpose to pursue. 

My eyes see the past…

My camera lens sees the present…

Link to comment
Share on other sites

Link to post
Share on other sites

  • 8 months later...

If the software you are using is compiled with a "recently updated" compiler, your software is "more likely" to use the new SIMD extensions.
Those capabilities won't be utilized if you are using old software, or software that is not maintained

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×