DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

Smit Gabani
Smit Gabani

Posted on • Updated on

SPO 600 Project : Auto-vectorization with iFunc - Stage 2

How to enable SVE and SVE2 on aarch64 systems:

gcc -g -O3 -c march=armv8-a+sve ...
Enter fullscreen mode Exit fullscreen mode
gcc -g -O3 -c march=armv8-a+sve2 ...
Enter fullscreen mode Exit fullscreen mode

How to enable SMID on aarch64 system:

gcc -g -O3 -march=armv8-a ...
Enter fullscreen mode Exit fullscreen mode

I was having difficulty in deciding which language to choose. Initiall I went with pyton as I had thought it will be easy. Then as the complexity of the project increase I decide to go with C as I thought the it would be the choise as we get to use gcc the again I chose python after Chris recomended it.

My code can be found at:
https://github.com/smitgabani/spo600_project

Clone professors test code repo from;
https://github.com/ctyler/spo600-fall2022-project-test-code.git

I have used make header utility used by some of my friends.
https://github.com/bjconlan/makeheaders.git

Step 1
Start implementing 3 functions for different modules:

I started by going through some code that Chris provided and seperated the code.
Parse the string in order to get the function prototype and name. This took a lot of time.

Now I will use the header utility as mentioned above.
Next produce a code file called header.c and place the extracted prototype on top of that file.

Then get the name of the function in the test code and add a prefix to the name
for eg.
If the funtion's name is foo make three files foo_sve foo_sve2 foo_adSMID.

Step 2
Make a resolver function that will have the logic to choose what implementation will be run

Step 3

Testing on VS Code:

Image description
Error are due to the architecture.

To check the output we need to run the process on israel machine as the machine supports the architecutre.

Testing on Israel SPO600 server:

Image description

Emulating different stytems using different architecture.

So far the tool has errors.

Top comments (0)

Top Heroku Alternatives (For Free)

>> Check out this classic DEV post <<