From 4537089a5cd17e49f5bb8d5e7f8374e451872387 Mon Sep 17 00:00:00 2001 From: David Svantesson Date: Wed, 22 Feb 2023 11:08:57 +0000 Subject: Fixes for CMake and Bazel builds, tests failing in scons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix 4 failing tests for multi_isa builds when experimental_fixed_format_kernels=1 - Fixes for CMake and Bazel builds to pass validation tests - Update documentation, remove “-DCPPTHREADS=1” flag from CMake build example Partially resolves: ONCPUML-1181 Signed-off-by: David Svantesson Change-Id: I7101676260a0adcb7b6ff6f4342ae36f921e7120 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9189 Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- CMakeLists.txt | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ac0c722a6..72992ed038 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,7 +101,12 @@ set(COMMON_CXX_FLAGS -Wsign-promo -Weffc++ -Wno-overlength-strings - -Wno-ignored-attributes) + -Wno-ignored-attributes + -Wlogical-op + -Wnoexcept + -Wstrict-null-sentinel + -Wno-misleading-indentation + -O3) # Disable note popups on compiler ABI changes if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") @@ -143,9 +148,7 @@ endif() add_library(arm_compute_sve "") target_compile_options(arm_compute_sve PRIVATE "-march=armv8.2-a+sve+fp16+dotprod") -target_compile_definitions(arm_compute_sve PRIVATE ENABLE_SVE) -target_compile_definitions(arm_compute_sve PRIVATE ARM_COMPUTE_ENABLE_SVE) - +target_compile_definitions(arm_compute_sve PRIVATE ARM_COMPUTE_ENABLE_BF16) target_include_directories( arm_compute_sve PUBLIC $ @@ -165,10 +168,8 @@ target_include_directories( add_library(arm_compute_sve2 "") target_compile_options(arm_compute_sve2 PRIVATE "-march=armv8.6-a+sve2+fp16+dotprod") -target_compile_definitions(arm_compute_sve2 PRIVATE ENABLE_SVE) -target_compile_definitions(arm_compute_sve2 PRIVATE ARM_COMPUTE_ENABLE_SVE) target_compile_definitions(arm_compute_sve2 PRIVATE ARM_COMPUTE_ENABLE_SVE2) - +target_compile_definitions(arm_compute_sve2 PRIVATE ARM_COMPUTE_ENABLE_BF16) target_include_directories( arm_compute_sve2 PUBLIC $ @@ -187,6 +188,7 @@ target_include_directories( add_library(arm_compute_core "") target_compile_options(arm_compute_core PRIVATE "-march=armv8.2-a+fp16") +target_compile_definitions(arm_compute_core PRIVATE ARM_COMPUTE_ENABLE_BF16) target_include_directories( arm_compute_core PUBLIC $ @@ -201,6 +203,8 @@ target_include_directories( target_compile_options(arm_compute_core PUBLIC ${COMMON_CXX_FLAGS}) add_library(ArmCompute::Core ALIAS arm_compute_core) +target_link_libraries( + arm_compute_core PUBLIC arm_compute_sve arm_compute_sve2) # --------------------------------------------------------------------- # Graph Library @@ -255,7 +259,9 @@ if(BUILD_TESTING) add_executable(arm_compute_validation "") target_compile_options(arm_compute_validation PRIVATE "-march=armv8.2-a+fp16") - + if(ENABLE_BF16_VALIDATION) + target_compile_definitions(arm_compute_validation PRIVATE ARM_COMPUTE_ENABLE_BF16) + endif() add_subdirectory(tests/validation) target_compile_options(arm_compute_validation PUBLIC ${COMMON_CXX_FLAGS}) set_target_properties( -- cgit v1.2.1