Skip to content

Commit e9a3476

Browse files
Merge pull request #1196 from labrinea/fmv
Create a learning path for Function Multiversioning.
2 parents e94c35a + d7d9a70 commit e9a3476

File tree

6 files changed

+571
-0
lines changed

6 files changed

+571
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Function Multiversioning
3+
4+
minutes_to_complete: 30
5+
6+
who_is_this_for: Developers who want to optimize their C/C++ applications across various Arm64 targets.
7+
8+
learning_objectives:
9+
- Take advantage of hardware features for tuning your applications at function level granularity.
10+
- Create multiple versions of C/C++ functions for the targets you intend to run your applications on.
11+
- Assist the compiler in generating better code for those targets, or provide your own optimized versions at the source level.
12+
- Automatically select the most appropriate function version for your host target at runtime.
13+
- Reuse your optimized application binaries across various targets.
14+
15+
prerequisites:
16+
- Basic knowledge of GNU function attributes. Familiarity with indirect functions (ifuncs) is a plus.
17+
- Basic understanding of loop vectorization.
18+
- Familiarity with Arm assembly.
19+
- LLVM 19 compiler with runtime library support or GCC 14.
20+
21+
author_primary: Arm
22+
23+
### Tags
24+
skilllevels: Intermediate
25+
subjects: Tuning
26+
armips:
27+
- Armv8
28+
- Armv9
29+
tools_software_languages:
30+
- C/C++
31+
operatingsystems:
32+
- Linux
33+
- Android
34+
- macOS
35+
36+
# ================================================================================
37+
# FIXED, DO NOT MODIFY
38+
# ================================================================================
39+
weight: 1 # _index.md always has weight of 1 to order correctly
40+
layout: "learningpathall" # All files under learning paths have this same wrapper
41+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
42+
---
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
next_step_guidance:
3+
4+
recommended_path: /learning-paths/PLACEHOLDER_CATEGORY/PLACEHOLDER_LEARNING_PATH/
5+
6+
further_reading:
7+
- resource:
8+
title: Arm C Language Extensions
9+
link: https://arm-software.github.io/acle/main/acle.html
10+
type: documentation
11+
12+
# ================================================================================
13+
# FIXED, DO NOT MODIFY
14+
# ================================================================================
15+
weight: 21 # set to always be larger than the content in this path, and one more than 'review'
16+
title: "Next Steps" # Always the same
17+
layout: "learningpathall" # All files under learning paths have this same wrapper
18+
---
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
review:
3+
- questions:
4+
question: >
5+
What is the main benefit of Function Multiversioning?
6+
answers:
7+
- I may reuse my binaries on different targets without sacrificing runtime performance.
8+
- My application binaries will be smaller in size.
9+
correct_answer: 1
10+
explanation: >
11+
The produced binaries can be reused on different targets, but they may be larger in size.
12+
13+
- questions:
14+
question: >
15+
Can I implement versions of a function in separate translation units?
16+
answers:
17+
- Yes, function versions can spread across different translations units.
18+
- No, all of them must be in the same translation unit.
19+
correct_answer: 1
20+
explanation: >
21+
There is no requirement for function versions to be defined in the same translation unit. However, all of them must be declared in the translation unit which contains the definition of the default version.
22+
23+
# ================================================================================
24+
# FIXED, DO NOT MODIFY
25+
# ================================================================================
26+
title: "Review" # Always the same title
27+
weight: 20 # Set to always be larger than the content in this path
28+
layout: "learningpathall" # All files under learning paths have this same wrapper
29+
---

0 commit comments

Comments
 (0)