User Tools

Site Tools


spo600:2024_winter_project

SPO600 2024 Winter Project

Goal

The goal of this project is to add a functioning proof-of-concept prototype of auto-function-multi-versioning capability to the Gnu Compiler Collection (GCC) for AArch64 systems.

Specifically:

1. It will be possible to enable AFMV from the compiler command-line, with a list of one or more architectural feature versions (these will be versions accepted by the existing FMV code, such as “sve” or “sve2”). The base machine target (-march=) will be used as the default target, and the specified architectural feature versions will be used as the additional variants.

2. The code in the program to be compiled will be treated as though the FMV target_clone attribute has been specified on every function.

3. Any function that does not benefit from FMV cloning will be built as the default version only; this is referred to as pruning. (It will be difficult to assess whether a function “benefits” from FMV cloning, so for this prototype, we may assume that if the function clones are different, they are worthwhile).

Tasks

These are the specific tasks that we need to undertake:

Name Description Lead
Command-line Parsing Parse the GCC command line to pick up AFMV options Muhammad Wajih Rajani
Version List Processing Process the version list received from the command-line to validate the architectural features Cameron Coenjarts
arch= Arguments The current GCC AArch64 FMV capability accepts versions that are identified by feature flags (such as “sve2”) but does not accept “arch=” arguments such as “arch=armv9-a” (those type of arguments are accepted by the x86 FMV implementation). Add this functionality. Linh Nguyen Le
Apply FMV cloning to functions automatically When the appropriate command-line options are provided, the compiler should automatically clone all functions, as if the target_clone attribute was specified. Travis Liu
Produce an error message if AFMV and FMV are used together Produce an error if the compiler is invoked with AFMV command-line options and there are FMV attributes specified in the code. Phuong Ngan Huynh
Prune Cloned Functions Remove any AFMV-created clone functions that do not provide any significant benefit or differentiation. Kristjan Punno
Diagnostic Output Provide diagnostic output (when activated by -fdump-…-… command-line options). Steven David Pillay
Git Wrangler Mangage the repository, including frequent rebasing. Matthew De Napoli
Update Documentation 1 Update the existing GCC IFUNC and FMV documentation (all archs)
Update Documentation 2 Update the existing ACLE documentationHeavendeep Kaur Munjal
Create AFMV Documentation Create documentation for the AFMV feature. Mimi Dang
Create Tests Create a suite of tests for the AFMV capability. (This is in addition to individual tests that the various task owners will prepare). Rachit Chawla

Project Stage 1

1. Become familiar with the GCC build process. Build the current development version of GCC on AArch64 and x86 platforms. Get to know how long a full build takes, how to change the build options, and how to install a local (non-system, personal) copy of GCC.

2. Select at least two tasks from the task list (above). For each task, identify:

(a) the specific, relevant sections of the GCC code base (source files and line numbers), or for non-code tasks such as documentation, where you will find the information you need (could be source files and line numbers, or other sources);

(b) a detailed description of the work that needs to be performed to complete the task; 1 (c) tools and techniques that you plan to employ;

(d) how you will test your work;

(e) skills and knowledge that you will need to acquire to complete the task;

(f) how you can complete each task independently of the work that is being performed on other tasks (i.e., how you can avoid blocking on other work if that other work is delayed or not completed);

(g) how your work will ultimately interface with the work from other tasks (how your code or other work will tie in to work from other tasks);

(h) a rough estimate of the amount of work involved in each task (in hours), and how you arrived at that estimate.

3. Of the tasks from step 2 above, prioritize your interest. Which task would you prefer to own? How confident are you that you will be able to complete the work?

4. Blog the above information.

Due Date

  • March 17 for Stage 1.

Project Stage 2

1. Complete the task from the task table. In order to avoid blocking on other tasks, perform the initial implementation as a stand-alone task which does not depend on any of the other tasks being performed (to the extent possible). For example, the Command-line Argument Processing would normally feed the Version List processing, which in turn would control the FMV Cloning of functions. In the initial stage, the command-line arguments should be parsed and stored into the appropriate locations. The Version List processing can be written in such a way that it processes hard-coded input value (or reads values from a file or other location to facilitate testing) so that this can be written without blocking (waiting) for the Command-line Argument Processing. Likewise, the initial implementation of the Version List processing can assume that AFMV is enabled for a couple of microarchitectures. In the next stage we will connect up the various tasks components so that they communicate their values effectively.

2. Be prepared to discuss your task plan during the Friday, March 22 class.

3. Attend the classes and be prepared to discuss your task as appropriate.

4. Blog about the process.

Due Date

  • Tentative: April 5 for Stage 2.
spo600/2024_winter_project.txt · Last modified: 2024/04/16 18:10 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki