Skip to content

Commit

Permalink
Merge pull request #1 from aobolensk/acl
Browse files Browse the repository at this point in the history
Integrate ARM Compute Library
  • Loading branch information
allnes authored Nov 14, 2024
2 parents 2af8df6 + de453be commit 9dc8db6
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 27 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get install -y cmake ninja-build ccache
sudo apt-get install -y cmake ninja-build ccache scons
- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -37,7 +37,7 @@ jobs:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get install -y cmake ninja-build ccache
sudo apt-get install -y cmake ninja-build ccache scons
- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -51,28 +51,6 @@ jobs:
- name: Build
run: |
cmake --build build --parallel
windows-msvc-build:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
windows_compile_environment: msvc
- name: CMake configure
shell: bash
run: >
cmake -S . -B build
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
shell: bash
run: |
cmake --build build --config Release --parallel
macos-clang-build:
runs-on: macOS-latest
steps:
Expand All @@ -81,7 +59,7 @@ jobs:
submodules: recursive
- name: Install dependencies
run: |
brew install ninja
brew install ninja scons
- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -103,7 +81,7 @@ jobs:
submodules: true
- name: Install dependencies
run: |
sudo apt-get install -y cmake ninja-build ccache gcovr lcov
sudo apt-get install -y cmake ninja-build ccache gcovr lcov scons
- uses: actions/checkout@v4
with:
submodules: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Run clang-tidy
with:
build_dir: build
apt_packages: ninja-build
apt_packages: ninja-build,scons
cmake_command: cmake -S . -B build -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
config_file: .clang-tidy
exclude: 3rdparty
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "3rdparty/googletest"]
path = 3rdparty/googletest
url = https://github.com/google/googletest
[submodule "3rdparty/ComputeLibrary"]
path = 3rdparty/ComputeLibrary
url = https://github.com/embedded-dev-research/ComputeLibrary
25 changes: 25 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
add_subdirectory(googletest)

set(COMPUTE_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ComputeLibrary)
set(CMAKE_BUILD_PARALLEL_LEVEL 4)

if (LINUX)
set(ACL_OS "linux")
elseif(APPLE)
set(ACL_OS "macos")
else()
set(ACL_OS "unknown")
endif()

if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(ACL_ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(ACL_ARCH "armv8.2-a")
else()
set(ACL_OS "unknown")
endif()

add_custom_target(build_compute_library ALL
COMMAND scons Werror=1 debug=0 asserts=0 neon=0 opencl=0 os=${ACL_OS} embed_kernels=1 arch=${ACL_ARCH} -j${CMAKE_BUILD_PARALLEL_LEVEL}
WORKING_DIRECTORY ${COMPUTE_LIBRARY_DIR}
COMMENT "Building Arm Compute Library with scons"
)
1 change: 1 addition & 0 deletions 3rdparty/ComputeLibrary
Submodule ComputeLibrary added at c61bd3

0 comments on commit 9dc8db6

Please sign in to comment.