User Tools

Site Tools


spo600:2024_winter_project

This is an old revision of the document!


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_cone 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 Priority
Command-line Parsing Parse the GCC command line to pick up AFMV options Required
Version List Processing Process the version list received from the command-line to validate the architectural features Required
FMV Access from C The current GCC AArch64 FMV capability works with the C++ frontend (g++) but not the C frontend (gcc). Other architectures such as x86 support access from the C frontend. Add this capability to the AArch64 FMV implementation. Desirable
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. Desirable
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. Required
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. Desirable
Prune Cloned Functions Remove any AFMV-created clone functions that do not provide any significant benefit or differentiation. Desirable (Required but could be added later
Diagnostic Output Provide diagnostic output (when activated by -fdump-…-… command-line options). Desirable
Git Wrangler Mangage the repository, including frequent rebasing. Required
Update Documentation Update the existing GCC IFUNC and FMV documentation (all archs) Desirable
Create AFMV Documentation Create documentation for the AFMV feature. Required
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).

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 the build time, 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:

(i) 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);

(ii) a detailed description the work that needs to be performed to complete the task;

(iii) tools and techniques that you plan to employ;

(iv) how you will test your work;

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

(vi) 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);

(vii) 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);

(ix) an 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

  • Target: March 10 for Stage 1.
  • We will discuss the date during the March 8 class.
spo600/2024_winter_project.1709651562.txt.gz · Last modified: 2024/04/16 18:10 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki