Added RISC-V Conan build (#20064)

This commit is contained in:
Ilya Lavrenov 2023-09-27 12:24:20 +04:00 committed by GitHub
parent edfb951876
commit a6e7bac962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 241 additions and 216 deletions

View File

@ -263,7 +263,12 @@ jobs:
/usr/share/openvino/samples/c/build_samples.sh
~/openvino_cpp_samples_build/intel64/Release/hello_query_device
python3 /usr/share/openvino/samples/python/hello_query_device/hello_query_device.py
python3 -c 'from openvino import Core; print(Core().available_devices)'
python3 -c 'from openvino import Core; Core().get_property("CPU", "AVAILABLE_DEVICES")'
python3 -c 'from openvino import Core; Core().get_property("GPU", "AVAILABLE_DEVICES")'
python3 -c 'from openvino import Core; Core().get_property("AUTO", "SUPPORTED_METRICS")'
python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_METRICS")'
python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_METRICS")'
python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_METRICS")'
python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6'
benchmark_app --help
ovc --help

View File

@ -1,199 +0,0 @@
name: Linux ARM64 with Conan (Ubuntu 20.04, Python 3.11)
on:
schedule:
# run daily at 00:00
- cron: '0 0 * * *'
workflow_dispatch:
# pull_request:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# push:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# branches:
# - master
concurrency:
group: ${{ github.head_ref || github.run_id }}-linux-arm64
cancel-in-progress: true
jobs:
Build:
# TODO: remove. Temporary measure to prevent the workflow from scheduling on forks.
if: ${{ github.repository_owner == 'openvinotoolkit' }}
defaults:
run:
shell: bash
runs-on: ubuntu-20.04-8-cores
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
BUILD_TYPE: Release
OPENVINO_REPO: ${{ github.workspace }}/openvino
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_DIR: ${{ github.workspace }}/install
OV_TEMP: ${{ github.workspace }}/openvino_temp
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
path: 'openvino'
- name: Init submodules for non Conan dependencies
run: |
pushd ${{ env.OPENVINO_REPO }}
git submodule update --init -- ${{ env.OPENVINO_REPO }}/src/plugins
git submodule update --init -- ${{ env.OPENVINO_REPO }}/thirdparty/gtest
git submodule update --init -- ${{ env.OPENVINO_REPO }}/thirdparty/open_model_zoo
popd
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
#
# Dependencies
#
- name: Install build dependencies
run: |
sudo -E apt update
# install dependencies needed to build CPU plugin for ARM
sudo -E apt --assume-yes install scons gcc-10-aarch64-linux-gnu g++-10-aarch64-linux-gnu
# generic dependencies
sudo -E apt --assume-yes install cmake ccache ninja-build unzip fdupes
- name: Install python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements.txt
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
- name: Install arm64 libraries
run: |
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted > arm64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted >> arm64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal universe >> arm64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates universe >> arm64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal multiverse >> arm64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates multiverse >> arm64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse >> arm64-sources.list
echo deb [arch=amd64] http://security.ubuntu.com/ubuntu/ focal-security main restricted >> arm64-sources.list
echo deb [arch=amd64] http://security.ubuntu.com/ubuntu/ focal-security universe >> arm64-sources.list
echo deb [arch=amd64] http://security.ubuntu.com/ubuntu/ focal-security multiverse >> arm64-sources.list
echo deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main >> arm64-sources.list
echo deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal universe >> arm64-sources.list
echo deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main >> arm64-sources.list
echo deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-security main >> arm64-sources.list
sudo mv arm64-sources.list /etc/apt/sources.list.d/
sudo -E dpkg --add-architecture arm64
sudo -E apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/arm64-sources.list
sudo -E apt-get install -y --no-install-recommends libpython3-dev:arm64
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: "2000M"
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save: ${{ github.ref_name == 'master' && 'true' || 'false' }}
verbose: 2
key: ${{ github.job }}-linux-arm64
restore-keys: |
${{ github.job }}-linux-arm64
- name: Install conan and dependencies
run: |
# create build directory
mkdir -p ${{ env.BUILD_DIR }}
python3 -m pip install conan
# install build profile compilers
sudo -E apt --assume-yes install gcc g++
# generate build profile
conan profile detect
# generate host profile for linux_arm64
echo "include(default)" > ${{ env.BUILD_DIR }}/linux_arm64
echo "[buildenv]" >> ${{ env.BUILD_DIR }}/linux_arm64
echo "CC=aarch64-linux-gnu-gcc-10" >> ${{ env.BUILD_DIR }}/linux_arm64
echo "CXX=aarch64-linux-gnu-g++-10" >> ${{ env.BUILD_DIR }}/linux_arm64
# install OpenVINO dependencies
conan install ${{ env.OPENVINO_REPO }}/conanfile.txt \
-pr:h ${{ env.BUILD_DIR }}/linux_arm64 \
-s:h arch=armv8 \
-of ${{ env.BUILD_DIR }}/dependencies \
-b missing
#
# Build
#
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: CMake configure
run: |
source ${{ env.BUILD_DIR }}/dependencies/conanbuild.sh
cmake \
-G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
-DENABLE_CPPLINT=ON \
-DENABLE_INTEL_GPU=ON \
-DENABLE_PYTHON=ON \
-DENABLE_WHEEL=ON \
-DPYBIND11_PYTHONLIBS_OVERWRITE=OFF \
-DPYTHON_MODULE_EXTENSION=$(aarch64-linux-gnu-python3-config --extension-suffix) \
-DPython3_INCLUDE_DIR=$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))") \
-DENABLE_TESTS=ON \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_PROTOBUF=ON \
-DENABLE_SYSTEM_SNAPPY=ON \
-DENABLE_SYSTEM_PUGIXML=ON \
-DCMAKE_TOOLCHAIN_FILE=${{ env.BUILD_DIR }}/dependencies/conan_toolchain.cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DARM_COMPUTE_SCONS_JOBS=${{ steps.cpu-cores.outputs.count }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DENABLE_PYTHON_PACKAGING=ON \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}
source ${{ env.BUILD_DIR }}/dependencies/deactivate_conanbuild.sh
- name: Clean ccache stats
run: ccache --zero-stats --show-config
- name: Build OpenVINO Runtime
run: cmake --build ${{ env.BUILD_DIR }} --parallel ${{ steps.cpu-cores.outputs.count }} --config ${{ env.BUILD_TYPE }}
- name: Show ccache stats
run: ccache --show-stats
- name: Install OpenVINO Runtime
run: cmake --build ${{ env.BUILD_DIR }} --parallel ${{ steps.cpu-cores.outputs.count }} --config ${{ env.BUILD_TYPE }} --target install
- name: Build OpenVINO C++ samples
run: |
source ${{ env.BUILD_DIR }}/dependencies/conanbuild.sh
${{ env.INSTALL_DIR }}/samples/cpp/build_samples.sh
source ${{ env.BUILD_DIR }}/dependencies/deactivate_conanbuild.sh
env:
CMAKE_TOOLCHAIN_FILE: ${{ env.BUILD_DIR }}/dependencies/conan_toolchain.cmake

188
.github/workflows/linux_riscv.yml vendored Normal file
View File

@ -0,0 +1,188 @@
name: Linux RISC-V with Conan (Ubuntu 22.04, Python 3.10)
on:
schedule:
# at 00:00 on Wednesday and Saturday
- cron: '0 0 * * 3,6'
workflow_dispatch:
pull_request:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
push:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
branches:
- master
- 'releases/**'
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-riscv
cancel-in-progress: true
jobs:
Build:
defaults:
run:
shell: bash
runs-on: aks-linux-16-cores
container:
image: ubuntu:22.04
volumes:
- /mount/caches:/mount/caches
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
OPENVINO_REPO: /__w/openvino/openvino/openvino
OPENVINO_BUILD_DIR: /__w/openvino/openvino/openvino_build
INSTALL_DIR: /__w/openvino/openvino/openvino_install
CONAN_USER_HOME: /mount/caches/ccache/ubuntu22_riscv64_Release/.conan
CCACHE_DIR: /mount/caches/ccache/ubuntu22_riscv64_Release
CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp
CCACHE_MAXSIZE: 50G
steps:
- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
path: 'openvino'
- name: Init submodules for non-Conan dependencies
run: |
pushd ${OPENVINO_REPO}
git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
popd
#
# Dependencies
#
- name: Install build dependencies
run: |
# create build directory
mkdir -p ${OPENVINO_BUILD_DIR}
# install compilers to build OpenVINO for RISC-V 64
apt --assume-yes install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
apt --assume-yes install gcc g++ python3-pip python3-venv python3-dev
# generic dependencies
apt --assume-yes install cmake ccache ninja-build fdupes patchelf
python3 -m venv ${OPENVINO_BUILD_DIR}/env
source ${OPENVINO_BUILD_DIR}/env/bin/activate
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/requirements.txt
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
python3 -m pip install conan
- name: Install RISC-V native debian packages
run: |
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted > riscv64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted >> riscv64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy universe >> riscv64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates universe >> riscv64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy multiverse >> riscv64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse >> riscv64-sources.list
echo deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse >> riscv64-sources.list
echo deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security main restricted >> riscv64-sources.list
echo deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security universe >> riscv64-sources.list
echo deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security multiverse >> riscv64-sources.list
echo deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy main >> riscv64-sources.list
echo deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy universe >> riscv64-sources.list
echo deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main >> riscv64-sources.list
echo deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main >> riscv64-sources.list
mv riscv64-sources.list /etc/apt/sources.list.d/
dpkg --add-architecture riscv64
apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/riscv64-sources.list
apt-get install -y --no-install-recommends libpython3-dev:riscv64
- name: Create conan_toolchain.cmake file
run: |
source ${OPENVINO_BUILD_DIR}/env/bin/activate
# generate build profile
conan profile detect
# patch settings.yml to contain riscv64 architecture
sed -i 's/sparcv9/riscv64/g' ~/.conan2/settings.yml
# generate host profile for linux_riscv64
echo "include(default)" > ${OPENVINO_BUILD_DIR}/linux_riscv64
echo "[buildenv]" >> ${OPENVINO_BUILD_DIR}/linux_riscv64
echo "CC=riscv64-linux-gnu-gcc" >> ${OPENVINO_BUILD_DIR}/linux_riscv64
echo "CXX=riscv64-linux-gnu-g++" >> ${OPENVINO_BUILD_DIR}/linux_riscv64
# install OpenVINO dependencies
conan install ${OPENVINO_REPO}/conanfile.txt \
-pr:h ${OPENVINO_BUILD_DIR}/linux_riscv64 \
-s:h arch=riscv64 \
-s:h build_type=${CMAKE_BUILD_TYPE} \
-o:h onetbb/*:tbbbind=False \
-of ${OPENVINO_BUILD_DIR}/dependencies \
-b missing
#
# Build
#
- name: CMake - Configure
run: |
source ${OPENVINO_BUILD_DIR}/env/bin/activate
source ${OPENVINO_BUILD_DIR}/dependencies/conanbuild.sh
cmake \
-G 'Ninja' \
-DENABLE_CPPLINT=OFF \
-DENABLE_INTEL_GPU=ON \
-DENABLE_PYTHON=ON \
-DENABLE_WHEEL=ON \
-DPYTHON_MODULE_EXTENSION=$(riscv64-linux-gnu-python3-config --extension-suffix) \
-DPython3_INCLUDE_DIR=$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))") \
-DPYBIND11_PYTHON_EXECUTABLE_LAST=${OPENVINO_BUILD_DIR}/env/bin/python3.10 \
-DENABLE_TESTS=ON \
-DTHREADING=SEQ \
-DENABLE_PYTHON_PACKAGING=ON \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_PROTOBUF=ON \
-DENABLE_SYSTEM_SNAPPY=ON \
-DENABLE_SYSTEM_PUGIXML=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \
-DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
-DCMAKE_TOOLCHAIN_FILE=${OPENVINO_BUILD_DIR}/dependencies/conan_toolchain.cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-S ${OPENVINO_REPO} \
-B ${OPENVINO_BUILD_DIR}
source ${OPENVINO_BUILD_DIR}/dependencies/deactivate_conanbuild.sh
- name: Cmake - Build
run: cmake --build ${OPENVINO_BUILD_DIR} --parallel
- name: Show ccache stats
run: ccache --show-stats
- name: Cmake - Install
run: cmake --build ${OPENVINO_BUILD_DIR} --parallel --target install
- name: Build OpenVINO C++ samples
run: |
source ${OPENVINO_BUILD_DIR}/dependencies/conanbuild.sh
${INSTALL_DIR}/samples/cpp/build_samples.sh
source ${OPENVINO_BUILD_DIR}/dependencies/deactivate_conanbuild.sh
env:
CMAKE_TOOLCHAIN_FILE: ${{ env.OPENVINO_BUILD_DIR }}/dependencies/conan_toolchain.cmake

View File

@ -75,7 +75,7 @@ function(addIeTarget)
file(GLOB_RECURSE sources ${sourceSearch})
# remove unnecessary directories
foreach(excludedDir ${ARG_EXCLUDED_SOURCE_PATHS})
foreach(excludedDir IN LISTS ARG_EXCLUDED_SOURCE_PATHS)
list(FILTER includes EXCLUDE REGEX "${excludedDir}.*")
list(FILTER sources EXCLUDE REGEX "${excludedDir}.*")
endforeach()

View File

@ -64,6 +64,11 @@ if(WIN32)
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
endif()
if(RISCV64)
# for std::atomic_bool
target_link_libraries(${TARGET_NAME} PRIVATE atomic)
endif()
ov_set_threading_interface_for(${TARGET_NAME})
ov_mark_target_as_cc(${TARGET_NAME})

View File

@ -65,6 +65,11 @@ target_compile_definitions(${TARGET_NAME}
FRONTEND_LIB_SUFFIX="${FRONTEND_NAME_SUFFIX}${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
if(RISCV64)
# for std::atomic_bool
target_link_libraries(${TARGET_NAME} PRIVATE atomic)
endif()
add_dependencies(${TARGET_NAME} ${UNIT_TESTS_DEPENDENCIES})
if (ENABLE_OV_ONNX_FRONTEND)

View File

@ -103,6 +103,9 @@ bool with_cpu_x86_avx() {
bool with_cpu_x86_avx2() {
return false;
}
bool with_cpu_x86_avx2_vnni() {
return false;
}
bool with_cpu_x86_avx512f() {
return false;
}

View File

@ -10,9 +10,13 @@ add_definitions(-DMULTIUNITTEST)
ov_add_test_target(
NAME ${TARGET_NAME}
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
ADDITIONAL_SOURCE_DIRS ${OpenVINO_SOURCE_DIR}/src/plugins/auto/src ${OpenVINO_SOURCE_DIR}/src/plugins/auto/src/utils
ADDITIONAL_SOURCE_DIRS
${OpenVINO_SOURCE_DIR}/src/plugins/auto/src
${OpenVINO_SOURCE_DIR}/src/plugins/auto/src/utils
INCLUDES
${OpenVINO_SOURCE_DIR}/src/plugins/auto ${CMAKE_CURRENT_SOURCE_DIR} ${OpenVINO_SOURCE_DIR}/src/plugins/auto/src
${OpenVINO_SOURCE_DIR}/src/plugins/auto
${CMAKE_CURRENT_SOURCE_DIR}
${OpenVINO_SOURCE_DIR}/src/plugins/auto/src
LINK_LIBRARIES
ngraphFunctions
unit_test_utils

View File

@ -1,6 +1,9 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <thread>
#include "include/auto_unit_test.hpp"
#include "openvino/runtime/properties.hpp"

View File

@ -5,6 +5,7 @@
#include <thread>
#include <common_test_utils/common_utils.hpp>
#include "include/auto_unit_test.hpp"
using DynamicOutputConfigParams = std::tuple<
ov::Any, // priority device list
ov::Any // expected device to run inference on

View File

@ -2,10 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <common_test_utils/test_constants.hpp>
#include "include/auto_unit_test.hpp"
#include <thread>
#include "common_test_utils/test_constants.hpp"
#include "include/auto_unit_test.hpp"
using Config = std::map<std::string, std::string>;
using namespace ov::mock_auto_plugin;

View File

@ -1,6 +1,9 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <thread>
#include "include/auto_unit_test.hpp"
#include "openvino/runtime/threading/immediate_executor.hpp"
#include "openvino/runtime/auto/properties.hpp"

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <thread>
#include <gmock/gmock.h>
#include <gtest/gtest.h>

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <thread>
#include <gmock/gmock.h>
#include <gtest/gtest.h>

View File

@ -19,14 +19,11 @@ else()
set(EXCLUDED_SOURCE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/extension ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instances/onnx)
endif()
if(X86_64)
if(NOT (ARM OR AARCH64))
list(APPEND EXCLUDED_SOURCE_PATHS
${CMAKE_CURRENT_SOURCE_DIR}/single_layer_tests/instances/arm
${CMAKE_CURRENT_SOURCE_DIR}/subgraph_tests/src/arm)
${CMAKE_CURRENT_SOURCE_DIR}/single_layer_tests/instances/arm
${CMAKE_CURRENT_SOURCE_DIR}/subgraph_tests/src/arm)
else()
list(APPEND EXCLUDED_SOURCE_PATHS
${CMAKE_CURRENT_SOURCE_DIR}/single_layer_tests/instances/x64
${CMAKE_CURRENT_SOURCE_DIR}/subgraph_tests/src/x64)
# temporary disable all custom tests for ARM
list(APPEND EXCLUDED_SOURCE_PATHS
${CMAKE_CURRENT_SOURCE_DIR}/single_layer_tests
@ -41,6 +38,12 @@ else()
set(TMP_EXPLICITLY_ENABLED_TESTS "${TMP_LIST_OF_EXPLICITLY_ENABLED_TESTS}")
endif()
if(NOT X86_64)
list(APPEND EXCLUDED_SOURCE_PATHS
${CMAKE_CURRENT_SOURCE_DIR}/single_layer_tests/instances/x64
${CMAKE_CURRENT_SOURCE_DIR}/subgraph_tests/src/x64)
endif()
addIeTargetTest(
NAME ${TARGET_NAME}
ROOT ${CMAKE_CURRENT_SOURCE_DIR}

View File

@ -12,11 +12,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ov_add_compiler_flags(/wd5051)
endif()
if (X86_64)
set(EXCLUDED_SOURCE_PATHS_FOR_UNIT_TEST
if(NOT (ARM OR AARCH64))
list(APPEND EXCLUDED_SOURCE_PATHS_FOR_UNIT_TEST
${CMAKE_CURRENT_SOURCE_DIR}/ngraph_transformations/arm)
else()
set(EXCLUDED_SOURCE_PATHS_FOR_UNIT_TEST
endif()
if(NOT X86_64)
list(APPEND EXCLUDED_SOURCE_PATHS_FOR_UNIT_TEST
${CMAKE_CURRENT_SOURCE_DIR}/jit_kernel_test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/registers_pool.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ngraph_transformations/x64
@ -25,7 +27,6 @@ else()
endif()
if (NOT ENABLE_MLAS_FOR_CPU)
set(MLAS_LIBRARY "")
list(APPEND EXCLUDED_SOURCE_PATHS_FOR_UNIT_TEST ${CMAKE_CURRENT_SOURCE_DIR}/gemm_api_test.cpp)
else()
set(MLAS_LIBRARY "mlas")