DEV Community

Hyporos
Hyporos

Posted on

SPO600 - Project Stage 3/3

Hello!

Hello everyone, my name is Brian and I'm going to be describing and explaining the process I used to complete the third stage of my project in the SPO600 course. If you haven't read the first or second stages yet, be sure to check them out!

What does the third stage consist of?

For the third stage, I have to look into SVE2 because of ARMv9 being around the corner. I must research it and look at how it could be incorporated into the current code for the package I selected in the second stage, FFmpeg. The reason we have to account for this is because it currently uses fixed-width SIMD, while SV32 uses variable-width SIMD. Because of this new method of running the software, the code will also have to check if it is supposed to use the old SIMD or new SIMD instructions.

What is SVE2 and what does it bring?

SVE2 stands for Scalable Vector Extensions v2. It is a superset of Neon and SVE. It improves vastly upon them both and includes a bunch of benefits.

The most important benefit is the improved diversity and coverage of the instruction set. While SVE can generally only work with HPC and ML programs, SVE2 can work outside of that range. (Computer Vision, baseband networking, genomics and server instructions)

With its connection to Neon, it also pretty much replicates many instructions from it.

More benefits it includes are the algorithmic, performance improvements for the ones listed below:

Computer vision
Multimedia
Long-Term Evolution (LTE) baseband processing
Genomics
In-memory database
Web serving
General-purpose software

How can it help the current state of FFmpeg?

The transition to SVE2 can be immensely helpful to a program such as FFmpeg. As it is already using SIMD, it's clear that it's a very useful addition. The program does many things at once which makes it a great candidate for running multiple operations from one instruction.

I think that the vf_nlmeans_neon.S file could benefit from it. Since SVE and SVE2 only works on Neon, pretty much anything else working on it can benefit from it as well. It will increase efficiency and performance in general. There can also be changes to account for the vector changes, allowing up to a higher number of 2048 bits.

Conclusion

To wrap up, we can safely estimate that the addition of SVE2 will be useful for not only FFmpeg but many other current and future packages. However, at the moment of writing this post, it's not yet made publicly available.

Top comments (0)