DEV Community

Cover image for SPO600 project part 1
A Serputov
A Serputov

Posted on

SPO600 project part 1

First of all, let's talk about the project and what we should do for the first stage.

This semester, the project involves adding SVE2 optimizations to an open-source software package.

For the first part, we will go through these parts:
(I decide not to rewrite the same documentation, you can read more about the rules of each part here.)

  1. Identify some candidate open-source packages for optimization.
  2. Find the SIMD implementations in these packages.
  3. Select the package you want to work with.
  4. Create a strategy for your changes.
  5. Note how the community accepts contributions and engages with the community to discuss your proposed work.

Let's find some open-source candidates:

I'm substantial open-source fun for almost two years now, and out of my curiosity, I decided first to check the libraries and software that I previously wanted to contribute.

The most recent idea was to look through Curl and a few python libraries. Also, I decided to see the javascript web socket library. Still, after reading more tips on the lab, I thought it's much better to look through library-level packages only and better with c/c++ because it's easier to add assembly in one of these ways:

  • auto-vectorization
  • inline assembler
  • intrinsicts.
Examples:
https://github.com/pandas-dev/pandas
https://github.com/booknlp/booknlp/find/main
https://github.com/optuna/optuna
Enter fullscreen mode Exit fullscreen mode

I've decided to switch to something better, and after a few hours of searching, I found this repository:
NSIMD https://github.com/agenium-scale/nsimd
FastDifferentialCoding https://github.com/lemire/FastDifferentialCoding
VS https://github.com/VcDevel/Vc
XSIMD https://github.com/xtensor-stack/xsimd

I was shocked to find this project from google repo:
https://github.com/google/highway and I even wrote an email to the owner repo to see what progress they did and everything about SIMD/SVE instructions inside the repo:

I received a feedback:
Image description

but unfortunately while receiving this email, I also saw that they already have SVE2 instructions:
Image description

It's great to have some experience and implement the todos, but that's in a different blogPost.

I decided to move on and came across these repositories:
XSIMD https://github.com/xtensor-stack/xsimd
VS https://github.com/VcDevel/Vc
Why?

Is there SIMD implementations in these packages?

Yes, both of these repositories have SIMD instructions, but one of them only has arm instructions.
Image description

Select the package you want to work with.

About the package.
Vc is portable, zero-overhead C++ types for explicitly data-parallel programming.

I will work mainly with VC to implement the SVE2 instructions and work with XSIMD.

Create a strategy for your changes.

For now, I have already forked their repo on GitHub and cloned it to my local VSCode. Now I will browse through the code to see what I can update, how their build process works, how the library works overall, and how to implement all the features for SVE2 instructions, like .h(header file) + script for build and so on.

Image description

Note how the community accepts contributions and engages with the community to discuss your proposed work.

I will need to write the message on slack or an email to check if I can add SVE2 instructions to their repo. But as it's a GitHub repo, I hope they will check my updates simply with a new Pull Request.

I created an Issue. Let's see how it will go:

https://github.com/VcDevel/Vc/issues/320

Also I will definitely spend time on google/highway. Please wait for my new blog about it as soon as possible.

Conclusion

⚠️ Computer Architecture Blog Post: Link

Links

🖇 Follow me on GitHub

🖇 Follow me on Twitter

_p.s This post was made for my Software Portability and Optimization class. Lab 6.

Latest comments (0)