aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/how_to_build_and_run_examples.dox
diff options
context:
space:
mode:
authorDavid Svantesson <david.svantesson@arm.com>2022-12-15 16:25:57 +0000
committerDavid Svantesson <david.svantesson@arm.com>2023-01-31 14:57:06 +0000
commite0c42ef651709fd284da3bedd2c98d420bd6fd1a (patch)
tree6c154adf5937946b85fd46a30e3b3ce4c3ea5717 /docs/user_guide/how_to_build_and_run_examples.dox
parent54eafd86fdeb19f2117271805a01da4395f9ef16 (diff)
downloadComputeLibrary-e0c42ef651709fd284da3bedd2c98d420bd6fd1a.tar.gz
Bazel and CMake builds
Resolves: ONCPUML-1110, ONCPUML-1109 Co-authored-by: Georgios Pinitas <georgios.pinitas@arm.com> Co-authored-by: Joe Ramsay <joe.ramsay@arm.com> Signed-off-by: David Svantesson <david.svantesson@arm.com> Change-Id: Iea693dbe53bf0af87867d6a9e0d1fd9fbe59ef3a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8981 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'docs/user_guide/how_to_build_and_run_examples.dox')
-rw-r--r--docs/user_guide/how_to_build_and_run_examples.dox117
1 files changed, 117 insertions, 0 deletions
diff --git a/docs/user_guide/how_to_build_and_run_examples.dox b/docs/user_guide/how_to_build_and_run_examples.dox
index eb2a2151d3..81aa02625d 100644
--- a/docs/user_guide/how_to_build_and_run_examples.dox
+++ b/docs/user_guide/how_to_build_and_run_examples.dox
@@ -396,5 +396,122 @@ OpenCL kernel level debugging can be simplified with the use of printf, this req
SVM allocations are supported for all the underlying allocations in Compute Library. To enable this OpenCL 2.0 and above is a requirement.
+@section S1_8_experimental_builds Experimental Bazel and CMake builds
+
+In addition to the scons build the repository includes experimental Bazel and CMake builds.
+Both are similar to the scons multi_isa build. It compiles all libraries with Neon (TM) support, as well as SVE and SVE2 libraries. The build is CPU only, not including OpenCL support. Both were successfully built with gcc / g++ version 10.2.
+
+@subsection S1_8_1_bazel_build Bazel build
+
+@subsubsection S1_8_1_1_file_structure File structure
+
+File structure for all files included in the Bazel build:
+
+ .
+ ├── .bazelrc
+ ├── BUILD
+ ├── WORKSPACE
+ ├── arm_compute
+ │  └── BUILD
+ ├── examples
+ │  └── BUILD
+ ├── include
+ │  └── BUILD
+ ├── scripts
+ │ ├── print_version_file.py
+ │  └── BUILD
+ ├── src
+ │  └── BUILD
+ ├── support
+ │  └── BUILD
+ ├── tests
+ │ ├── BUILD
+ │  └── framework
+ │  └── BUILD
+ └── utils
+ └── BUILD
+
+@subsubsection S1_8_1_2_build_options Build options
+
+Available build options:
+
+ - debug: Enable ['-O0','-g','-gdwarf-2'] compilation flags
+ - Werror: Enable -Werror compilation flag
+ - logging: Enable logging
+ - cppthreads: Enable C++11 threads backend
+ - openmp: Enable OpenMP backend
+
+@subsubsection S1_8_1_3_example_builds Example builds
+
+Build everything (libraries, examples, tests):
+
+ bazel build //...
+
+Build libraries:
+
+ bazel build //:all
+
+Build arm_compute only:
+
+ bazel build //:arm_compute
+
+Build examples:
+
+ bazel build //examples:all
+
+Build resnet50 example:
+
+ bazel build //examples:graph_resnet50
+
+Build validation and benchmarking:
+
+ bazel build //tests:all
+
+@subsection S1_8_2_cmake_build CMake build
+
+@subsubsection S1_8_2_1_file_structure File structure
+
+File structure for all files included in the CMake build:
+
+ .
+ ├── CMakeLists.txt
+ ├── cmake
+ │ ├── Options.cmake
+ │ ├── Version.cmake
+ │  └── toolchains
+ │  └── aarch64_linux_toolchain.cmake
+ ├── examples
+ │  └── CMakeLists.txt
+ ├── src
+ │ └── CMakeLists.txt
+ └── tests
+ ├── CMakeLists.txt
+ ├── benchmark
+ │ └── CMakeLists.txt
+ └── validation
+ └── CMakeLists.txt
+
+@subsubsection S1_8_2_2_build_options Build options
+
+Available build options:
+
+ - DEBUG: Enable ['-O0','-g','-gdwarf-2'] compilation flags
+ - WERROR: Enable -Werror compilation flag
+ - EXCEPTIONS: If disabled ARM_COMPUTE_EXCEPTIONS_DISABLED is enabled
+ - LOGGING: Enable logging
+ - BUILD_EXAMPLES: Build examples
+ - BUILD_TESTING: Build tests
+ - CPPTHREADS: Enable C++11 threads backend
+ - OPENMP: Enable OpenMP backend
+
+@subsubsection S1_8_2_3_example_builds Example builds
+
+To build libraries, examples and tests:
+
+ mkdir build
+ cd build
+ cmake .. -DOPENMP=1 -DCPPTHREADS=1 -DWERROR=0 -DDEBUG=0 -DBUILD_EXAMPLES=1 -DBUILD_TESTING=1 -DCMAKE_INSTALL_LIBDIR=.
+ cmake --build . -j32
+
*/
} // namespace arm_compute