spo600:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
spo600:start [2025/02/18 14:56] – chris | spo600:start [2025/03/14 10:30] (current) – chris | ||
---|---|---|---|
Line 12: | Line 12: | ||
|Week 5|February 3|[[#Week 5 - Class I|Compiler Optimizations & Compiler Internals]]|[[# | |Week 5|February 3|[[#Week 5 - Class I|Compiler Optimizations & Compiler Internals]]|[[# | ||
|Week 6|February 10|[[#Week 6 - Class I|64 Bit Assembler Lab]]|[[# | |Week 6|February 10|[[#Week 6 - Class I|64 Bit Assembler Lab]]|[[# | ||
- | |Week 7|February 17|[[#Week 7 - Class I|Indirect Functions (IFUNC) and Function Multi Versioning (FMV)]]|[[#Week 7 - Class II|Automatic Function Multi Versioning (AFMV)]]|[[# | + | |Week 7|February 17|[[#Week 7 - Class I|Project Stage 1]]|[[#Week 7 - Class II|Indirect Functions (IFUNC), Function Multi Versioning (FMV), |
|Reading Week|February 24|Study Week||| | |Reading Week|February 24|Study Week||| | ||
- | |Week 8|March 3|Project Discussion|Single Instruction Multiple Data (SIMD) and Scalable Vector Extensions (SVE and SVE2)|Project Stage 1, Blog posts group 2| | + | |Week 8|March 3|[[#Week 8 - Class I|Project Discussion; Single Instructioni Multiple Data (SIMD)]]|[[# |
- | |Week 9|March 10|Project Discussion|Profiling and Benchmarking|Project blogging| | + | |Week 9|March 10|[[#Weel 9 - Class I|Project Discussion]]|[[#Week 9 - Class II|Project Stage II]]\\ **Async**|[[# |
|Week 10|March 17|Project Discussion|Algorithm Selection|Project blogging| | |Week 10|March 17|Project Discussion|Algorithm Selection|Project blogging| | ||
|Week 11|March 24|Project Discussion|Paged Memory|Project stage 2, Blog posts group 3| | |Week 11|March 24|Project Discussion|Paged Memory|Project stage 2, Blog posts group 3| | ||
Line 294: | Line 294: | ||
=== Video === | === Video === | ||
- | * Edited summary video pending | + | {{vimeo> |
=== 64-bit Class Servers === | === 64-bit Class Servers === | ||
Line 312: | Line 312: | ||
=== Video === | === Video === | ||
- | * Edited summary video pending | + | {{vimeo> |
==== Week 6 Deliverables ==== | ==== Week 6 Deliverables ==== | ||
Line 322: | Line 322: | ||
=== Video === | === Video === | ||
- | * Edited summary video pending | + | {{vimeo> |
=== Project Stage 1 === | === Project Stage 1 === | ||
* [[2025 Winter Project# | * [[2025 Winter Project# | ||
- | < | + | ==== Week 7 - Class II ==== |
=== Video === | === Video === | ||
- | | + | {{vimeo> |
+ | |||
+ | === Runtime Codepath Selection === | ||
+ | |||
+ | 1. **IFUNC** - The ifunc capability allows a program to provide multiple implementations of a function, and to use a " | ||
+ | * multiple implementations of the desired function with different names | ||
+ | * the resolver function (which can select between the implementations based on any criteria, but usually selects based on the hardware capabilities of the runtime system) | ||
+ | * a prototype that ties together the desired target name and the resolver function | ||
+ | |||
+ | 2. **FMV** | ||
+ | * With manually-written functions: | ||
+ | * each function has the same name, and an attribute which specifies which architectural variant that function version is to be used on | ||
+ | * the resolver function is provided automatically by the compiler | ||
+ | |||
+ | * With function cloning: | ||
+ | * only one version of the function is provided, and an attribute specifies the list of architectural variants. The function is automatically cloned by the complier with one function clone for each architectural variant, and each clone is optimized for a specific variant. | ||
+ | * the resolver function is provided automatically by the compiler | ||
+ | |||
+ | This requires fewer code changes than ifunc, but still requires that the programmer state the architectural variants that will be targetted. The programmer also needs to know (or guess!) which functions would benefit from multiversioning. | ||
+ | |||
+ | 3. **AFMV** - This " | ||
+ | * all functions will be cloned and subject to the compiler' | ||
+ | * any function clones which are fundamentally the same after optimization will be pruned back to a single implementation | ||
+ | |||
+ | === Resources === | ||
+ | |||
+ | * [[Building GCC]] guide page on this wiki | ||
+ | * [[https:// | ||
+ | * See especially: | ||
+ | * The [[https:// | ||
+ | * Take particular note of the section on Contributing to GCC. | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * Note that GCC is [[https:// | ||
+ | |||
+ | == Specifics: IFUNC == | ||
+ | |||
+ | GCC IFUNC documenation: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | == Specifics: FMV == | ||
+ | |||
+ | Current documentation: | ||
+ | |||
+ | 1. [[https:// | ||
+ | * Mentions that FMV is only implemented for i386 (aka x86_32) - now false as it's also implemented for x86_64, Power (PPC64), and aarch64 | ||
+ | * Does not mention '' | ||
+ | |||
+ | 2. [[https:// | ||
+ | * Does not talk about the current state of implementation | ||
+ | * Mentions that FMV may be disabled at compile time by a compiler flag, but this flag is not documented and does not appear to be implemented | ||
+ | * The macro ''< | ||
+ | |||
+ | Implementation in GCC | ||
+ | * Implemented and tested in (at least) x86_64, PowerPC4, and AArch64 | ||
+ | * I did not test the PowerPC version | ||
+ | * Testing performed with GCC 14.0.1 20240223 with limited testing on 14.2.1 20240912. | ||
+ | |||
+ | * On x86: | ||
+ | * Syntax to manually specify a function target: ''< | ||
+ | * target_version is not accepted as an alternative to target attribute | ||
+ | * Syntax to manually specify cloning: ''< | ||
+ | * Works in both the C and C++ frontends | ||
+ | |||
+ | * On AArch64: | ||
+ | * Current support landed Dec 16, 2023; see commit 0cfde688e21 (and the commit messages) in the GCC Git repository (https:// | ||
+ | * Syntax to manually specify a function target: ''< | ||
+ | * Syntax to manually specify cloning: ''< | ||
+ | * Manually specified function target (initially) works in the C++ frontend only, but automatic cloning appears to work in both C and C++. Note that most C code can be compiled with the C++ frontend, except for some recent C enhancements not understood by C++ as well as some C++ keywords that are not reserved in C | ||
==== Week 7 Deliverables ==== | ==== Week 7 Deliverables ==== | ||
* Work on your Project Stage 1 and blog about it. | * Work on your Project Stage 1 and blog about it. | ||
+ | ===== Week 8 ===== | ||
+ | |||
+ | ==== Week 8 - Class I ==== | ||
+ | |||
+ | === Video === | ||
+ | |||
+ | **There are some technical issues with camera focus on the video for this week.** My apologies for the low quality! | ||
+ | |||
+ | {{vimeo> | ||
+ | |||
+ | === SIMD Examples === | ||
+ | |||
+ | The sound volume scaling examples mentioned in the video may be found in the file ''/ | ||
+ | |||
+ | ==== Week 8 - Class II ==== | ||
+ | |||
+ | === Video === | ||
+ | |||
+ | {{vimeo> | ||
+ | |||
+ | === SVE/SVE2 Examples === | ||
+ | |||
+ | For some SVE/SVE2 example code, see ''/ | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * (ignore the directory '' | ||
+ | |||
+ | ==== Week 8 Deliverables ==== | ||
+ | |||
+ | * Complete your project stage 1, and blog posts group 2, by Sunday night (March 9 at 11:59 pm). | ||
+ | |||
+ | ===== Week 9 ===== | ||
+ | |||
+ | ==== Week 9 - Class I ==== | ||
+ | |||
+ | === Video === | ||
+ | * Edited summary video pending | ||
+ | |||
+ | ==== Week 9 - Class II ==== | ||
+ | |||
+ | === Project Stage II === | ||
+ | * Refer to your email for Project Stage I feedback. | ||
+ | * See the [[2025_winter_project# | ||
+ | |||
+ | ==== Week 9 Deliverables ==== | ||
+ | * Start on your Project Stage II and blog about your work. | ||
<!-- | <!-- |
spo600/start.1739890587.txt.gz · Last modified: 2025/02/18 14:56 by chris