Posts

Showing posts from December, 2022

Naziur Rahman khan Fall 2022 SPO600 Project_Stage3

Image
I have used Python auto vectorization tool to modify existing functions for different architecture and it calls the GCC compiler and pass the appropriate flags to enable auto vectorization for that specific code. For example, to enable auto vectorization with the GCC compiler, the "-O3" flag can be used to enable aggressive optimization. Additionally, the "-march=armv8-a+sve","-march=armv8-a+sve2","-march=armv8-a" flag can be used to enable vectorization for the specific type of CPU being used, such as SVE, SVE2, or ASIMD. In summary, auto vectorization is a useful technique for improving the performance of programs on ARM CPUs with SVE, SVE2, and ASIMD instructions. By using the GCC compiler and the appropriate flags, it is possible to enable auto vectorization in the C programming language. This can help to optimize programs and take advantage of the SIMD capabilities of modern ARM processors. I have completed the stage2 for the auto vectorizat

SPO-600 64-bit Assembly Language Lab4-part2

Image
  Task 4: In our previous part we had run the loop for 10 times. So, we only needed a single digit. However in the next task we will work with the aarch64 system to write a code that will loop to 30. So we have 2 digits to work with for which I will use 2 registers. Quotient was calculated by udiv which was my first digit. On the other hand remainder was calculated by the msub which was stored in the second digit. Once calculated I stored both of them registered in their specific locations on the string by using the strb. You can see all my codes from my github repo:  https://github.com/myseneca-162912216/SPO-600/tree/main/Lab%204/Aarch64  Below is the output of my code with the leading zero: Task 5: In this task I have to edit the code in such a way that it will remove the unnecessary leading zero of the first 10 numbers. I accomplished it by using a label. A label has been added before the second writing the second digit so that the first digit can be skipped. cmp command used to c

Naziur Rahman khan Fall 2022 SPO600 Project_Stage2

Image
While I first approach this project I was kind of blank like where to start my first step. I previously had no exposure to work with low level coding neither C coding. Till now I am only comfortable with doing some mid level python coding. My project is to build a tool that can be written in any language whose main purpose is to take function from a single file and create three copy of it with the variation of the function for each auto vectorization type and also add an ifunc resolver to choose which one of those functions to use based on the particular system capability.  We got our main file from our professor's github repo that he shared with us. I copied the files to my assignment armv8 machine called israel from this link: https://github.com/ctyler/spo600-fall2022-project-test-code.git I have kept all my project related file in my repo which can be accessed from here https://github.com/myseneca-162912216/SPO-600/tree/main/spo600_stage_2 I have taken some help regarding proces

SPO-Project concepts and tools.(Part 2)

In this blog I will discuss the concept of Auto vectorization, SIMD, SVE and SVE2. This are the core concept of software optimization. Auto-vectorization: In early days, computers used to have one logic unit that was capable of executing one instruction on one pair of operands at a given time. For this reason computer programs and languages were built to execute sequentially. However modern computers have the capability to perform many task at a time. There are many optimizing compilers who perform automatic vectorization which enables to do some parallel operations where possible instead of only sequential operations. This concept is called vector implementation which can process one operation in multiple pair of operands at a given time. For AArch64 system there are three extensions for the Auto vectorization. These are SIMD, SVE, SVE2. For Auto vectorization to be in effect the flags need to be used. This includes –O3, -ftree-vectorize etc. For more detailed explanation wi

SPO-Project concepts and tools.(Part 1)

Through the next couple of days, I will publish a series of blogs about different tools and concepts that will be useful for me to implement the final project of my SPO600 course. In this blog I will talk about GCC and how does it work. GCC Compiler: GCC stands for GNU Compiler Collection which is an optimizing compiler and it is a product of GNU project. It supports various programming languages, hardware architectures and operating systems. It is a key component in the GNU toolchain. Most of the projects related to GNU and the Linux kernel uses GCC as their compiler. This has been made available as a free software.   GCC working pr­inciple : GCC is a toolchain which compiles and links code with any of the library dependencies and then converts that code to assembly language. After that it prepares executable files from it. GCC follows the standard UNIX design mechanism which uses simple tools to perform individual tasks well. When we run GCC with a source code file, at first