Backwards compatibility of AVX

Backwards compatibility of AVX

softtalk的头像

Could you clarify please whether there are any backwards compatibility issues with AVX? Should programmers consider it an added extra where supported, or will programs using it require it to run correctly?

Thanks!

5 帖子 / 0 new
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项.
Hannes Hofmann的头像

To my understanding it's to be considered as an extra, similar to SSE.

Brijender Bharti的头像

AVX works with SSE or non-SSE code, so in that sense it is backward compatible. It added a lot of other features in addition to SSE e.g. wider vector, 3 operand instruction coding, compact and efficient encoding of instructions, all adding to give better performance.

softtalk的头像

Thank you both for your responses!

Hannes Hofmann的头像

One more thing to add: There is a performance penalty for switching from SSE to AVX instructions (and vice-versa), so you should not mix them too much in your code. Try grouping them in separate blocks or use AVX only where possible.

登陆并发表评论。