Setup a new project
This section shows you how to setup an example project.
Last updated
This section shows you how to setup an example project.
Last updated
For this example, we will use a code sample from the following open-source project: .
You may retrieve it using any of these methods:
Using the following command:
git clone https://github.com/wedolow/Codes-Samples
, or
Downloading the latest version as a zip , and unzipping it.
The code used in this example is contained by subfolder FFT-C. This code implements a CPU-based Fast Fourier Transform algorithm, a Makefile to build it, and contains test cases to stimulate the algorithm.
The code does not need to be able to build or run on your own system, as we will be using a Debian 11 Docker container for build, run, analysis and optimization, provided to you by WedoLow.
Once logged in, you end up on the projects page.
Click on Create a new project.
Then, enter a project name, e.g "FFT-C", an optional description and click Next.
Then, select Copy the project and enter a version name.
In this section, you are requested to provide the root directory of your project. You may either:
Click Browse to open your system's directory selector to open FFT-C directory, or
Drag-and-drop FFT-C directory from your file explorer.
Click Confirm and next.
In each project setup, there are two platforms which must be defined:
The build platform: it represents the system on which all your build actions occur. This is also the system where all analyses and optimization processes done by beLow will occur.
The target platform: it represents the system on which the code generated by your build process executes.
E.g, if I am cross-compiling a project on my Windows 11 Intel Skylake PC that will run on a Raspberry Pi 3B+ system running Raspbian OS:
My build platform is a Windows system running on x86_64 Intel Skylake architecture
My target platform is a Linux System running on AARCH64 Cortex-A53 ARMv8 architecture
In the current FFT-C example we are setting up, the build and target platforms are the same, i.e, a Debian 11 Linux System running on an x86_64 architecture.
On this page, you have to select the target platform. Select Linux System - Debian GNU/Linux 11 (bullseye) - x86_64 - Intel skylake, even if you are working on a non-Linux system.
Activate Dynamic analysis (auto). This way, beLow will automatically manage the execution of dynamic traces and associated profiling.
Activate Restructuring optimizations. This option enables the search for additional optimizations of the code in the case beLow is able to build/execute the project in a closed loop, i.e. with scripts that run exclusively on the build platform.
Click on Confirm and next.
In this page, let's tell beLow how the code will be executed. You may choose between executing the run script on the build platform or on the target platform.
When running the execution script on the build platform, the script is responsible for sending the compiled executable to the target platform, executing it, and retrieving the generated profiling data.
When running the execution script on the target platform, a beLow runner must be running on the target platform and will handle the execution and the retrieval of the profile data.
In our case, the build and target platform are the same, so we can select either one or the other with the same effect.
When building FFT-C, our test bench will be a binary file app_test.exe
at the root of our project. Setup the script the following way:
Script content:
Script execution path: the project's root (leave empty)
Shell: Bash or Sh
Then, click Confirm and next.
In target options, you may choose to install software and libraries on the fly on your target platform, or inject environment variables. In our case, we don't need any.
Click on Confirm and next.
On this screen, we must select the build platform, i.e. the platform our scripts will be executed on. Depending on your system and previous choices, you may see two platforms at most.
Linux System - Debian GNU/Linux 11 (bullseye) - x86_64 - Any CPU, which is a Dockerized platform provided to you by beLow, available in any installation
Another platform corresponding to your own system.
Select Linux System - Debian GNU/Linux 11 (bullseye) - x86_64 - Any CPU, and click on Confirm and next.
In build options section, we have ton install a software on the fly, called check
, which is required in FFT-C project build process.
To do that, unroll the section Software to install. You will see a loading animation while all packages that are automatically installable in a Debian 11 Docker image are listed.
Once the list appears, use the search bar to find the check
package, and select it. Then, click Confirm and next.
On the following page, we will tell beLow how the project must be built for the selected target.
Leave Configure section blank as there is no configuration required for our project.
For Clean section, enter:
Script content:
Script execution path: the project's root (leave empty)
Shell: Bash or Sh
For Build section, enter:
Script content:
Script execution path: the project's root (leave empty)
Shell: Bash or Sh
Then, click Confirm and next.
As we activated restructuring optimizations, we must also provide build scripts that target the build platform (instead of targetting the target platform as just before), and how to run the executable on the build platform.
As our build and target platforms are the same, we are in a special case where the scripts are exactly the same as entered previously.
Leave Configure section blank.
For Clean section, enter:
Script content:
Script execution path: the project's root (leave empty)
Shell: Bash or Sh
For Build section, enter:
Script content:
Script execution path: the project's root (leave empty)
Shell: Bash or Sh
For Run section, enter:
Script content:
Script execution path: the project's root (leave empty)
Shell: Bash or Sh
Then, click Confirm and next.
Jobs are now triggerred, that test your project build, attempt to understand your build actions and explore the source code of your project to identify the functions and their hierarchy.
When the job finishes, you see a table with the list of all your project's functions.
In this section, we must select a top function which represents the highest level in the hierarchy that will be analyzed/optimized. All functions called by this function (and recursively) will be taken into consideration. However, all functions in independent graphs or upstream in the top function graph will not.
Click View function tree to see how they relate one to another. (Optional)
Close the graph by clicking on the cross.
In our example, let's select app_exec as our project top function. Indeed, the functions calling it are test bench setup functions that we don't need to optimize, and app_exec is the entrypoint of FFT function calls that we are interested in.
Leave quality settings section untouched here.
Click Confirm and next.
After a quick post-processing job, your project setup is complete. Let's now !