Testing for Stage II for Project
Hi Everyone, I am writing this blog in continuity of my previous blog about Project Stage II. You can read my previous blog on this link.
In this blog I am going to demonstrate how to use the tool and test it.
You can get the tool from https://github.com/NishanSingh6/SPO600-Project.
But before using this tool please read the following conditions and limitations of using this tool at its current version which is v1.0.
Limitations:
This is initial implementation of the tool, due to which it have several bugs and limitations. I will fix these limitations and bugs in the final version of the tool in Stage III of project. Following are the limitations and conditions:- The very first limitation of the tool is that is accepts only two arguments. First argument must be main.c file and second argument must be .c file which contains the function which needs to be vectorized. This tool does not have proper exception handling or any input data validation, due to which if any arguments are invalid or they are in wrong order or second argument does not contains the single function then this tool will break and will not work properly.
- The second and most important limitation of the tool is that for now it only accepts the function with name "adjust_channels". The function which needs to be vectorized must be named adjust_channels. This tool will work only if function which needs to vectorized is void, it does not return anything. If second argument does not contain the function with name adjust_channels then the tool will not work properly.
- The third major limitation of the tool is that arguements of function which needs to be vectorized (adjust_channels for now) should be only built-in data types. These should not contain any user-defined data types such as structs or classes.
- Other than these, this tool has some minor bugs along with permitted limitations. These permitted limitations are described in my previous blog, you can find my previous blog on this link.
How to use:
This tool will run only on AArch64 systems. Firstly use the following command to clone the tool.
git clone https://github.com/NishanSingh6/SPO600-Project
By using following command files will be copied.python tool.py arg1 arg2
Here arg1 is the main.c, and arg2 is filename of the file which contains the function which will be vectorized.Before testing it, lets clone the testing directory provided by professor, this directory contains all the file needed.
You can run the following command to clone the director:
git clone https://github.com/ctyler/spo600-fall2022-project-test-code
First rename the directory to something simple such as test.
After cloning both directories copy the tool.py and template.txt to test. you can do it using following code
cp SPO600-Project/* test/
After copying the file go to test directory and double check that all the files are in the same directory, these must be in the same directory in order tool to work.
python tool.py main.c function.c
Here main is the file binary output file.
To test it we can run the following command.
./main /tests/input/bree.jpg 1.0 1.0 1.0 /tests/output/bree.jpg
As I am using israel.cdot.systems as my system which does not support SVE, We can qemu-aarch64 to run the emulator. By adding it before the previous command we can see this time it will use sve2 implementation.
By following above given instruction you can test the tool.I will update its features and overcome the limitations and fix bugs for the stage 3.
Comments
Post a Comment