You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/laptops-and-desktops/kleidicv-on-mac/build-1.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,13 @@ You can use KleidiCV as a standalone image processing library or integrate it wi
15
15
16
16
## Set up your environment
17
17
18
-
To follow this example you'll need a MacBook Pro with an Apple Silicon M4 processor. To check your operating system version, select the **Apple menu ()** in the top-left corner of your screen and choose **About This Mac**. Alternatively, open a terminal and run:
18
+
To follow this example you'll need a MacBook Pro with an Apple Silicon M4 processor.
19
+
20
+
To check your operating system version, follow these steps:
21
+
22
+
- Select the **Apple menu ()** in the top-left corner of your screen
23
+
- Select **About This Mac**
24
+
- Alternatively, open a terminal and run:
19
25
20
26
```console
21
27
sw_vers
@@ -27,8 +33,9 @@ ProductName: macOS
27
33
ProductVersion: 15.5
28
34
BuildVersion: 24F74
29
35
```
36
+
### Install CMake
30
37
31
-
You also need CMake. If CMake is not already installed on your host machine, you can install it using Homebrew:
38
+
If CMake is not already installed on your host machine, you can install it using Homebrew:
32
39
33
40
```bash
34
41
brew install cmake
@@ -115,7 +122,7 @@ export WORKSPACE=$HOME/kleidi
115
122
116
123
To set up KleidiCV and OpenCV, first download the source code from GitLab.
117
124
118
-
In your $WORKSPACE directory, clone KleidiCV using the v0.6.0 release tag.
125
+
In your $WORKSPACE directory, clone KleidiCV using the v0.6.0 release tag:
KleidiCV provides several CMake options to control which instruction sets and features are enabled during the build. Here are the most important options for Arm systems:
150
+
KleidiCV provides several CMake options to control which instruction sets and features are enabled during the build.
151
+
152
+
Here are the most important options for Arm systems:
145
153
146
154
-**KLEIDICV_ENABLE_SVE2**
147
155
Enables Scalable Vector Extension 2 (SVE2) code paths. This is on by default for popular compilers that support SVE2, but off otherwise.
@@ -191,7 +199,7 @@ ls ./build-kleidicv-benchmark-SME/benchmark/kleidicv-benchmark
191
199
```
192
200
## Build the OpenCV with KleidiCV
193
201
194
-
The following command can be used to build OpenCV with KleidiCV:
202
+
You can use the following command to build OpenCV with KleidiCV:
The output is truncated, but you will see performance metrics for all operations at 1280x720 resolution.
431
+
The output is truncated for brevity, but you will see detailed performance metrics for each operation at 1280x720 resolution. Look for lines showing the operation name, sample count, mean and median times, and standard deviation. These results help you compare the performance of different backends and confirm that SME or NEON acceleration is active.
433
432
434
433
## Use lldb to check the SME backend implementation
Enter the `target` command followed by the `b` command for the breakpoint, and the `run` command. When the breakpoint is reached enter the `bt` command to see the stack trace followed by the `disassemble` command to display the assembly instructions in SME streaming mode. Use the `quit` command at the end to exit `lldb`.
468
+
This command displays the stack trace, showing how the function was called.
469
+
470
+
Next, to view the assembly instructions (including SME streaming mode), enter:
471
+
472
+
```console
473
+
disassemble --frame
474
+
```
475
+
476
+
After you finish inspecting the output, exit `lldb` by typing:
477
+
478
+
```console
479
+
quit
480
+
```
457
481
458
-
Some of the paths will be different for you, but you can enter the commands and follow the output.
482
+
Note: Your file paths may differ, but the sequence of commands remains the same. Enter each command as shown and review the output at each step.
0 commit comments