From b6af482bc5d8e4f03f876e17909c561de198c4d3 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 14 Sep 2021 12:33:34 +0100 Subject: Per-operator build dependencies Creates a list of operators their respective dependencies. Alters the build system to walk-through them resolve the dependencies and build Compute Library. Removes the following unused kernels/functions: -[NE|CL]MinMaxLayerKernel -CLFillBorder Resolves: COMPMID-4695,COMPMID-4696 Signed-off-by: Georgios Pinitas Change-Id: I35ebeef38dac25ec5459cfe9c5f7c9a708621124 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/357914 Tested-by: bsgcomp Reviewed-by: Michele DiGiorgio Comments-Addressed: bsgcomp Signed-off-by: Freddie Liardet Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6295 Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- SConstruct | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index ee8108bf71..7591075cd1 100644 --- a/SConstruct +++ b/SConstruct @@ -23,8 +23,10 @@ # SOFTWARE. import SCons +import json import os import subprocess +import sys def version_at_least(version, required): @@ -76,7 +78,8 @@ vars.AddVariables( ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""), ("extra_link_flags", "Extra LD flags to be appended to the build command", ""), ("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", ""), - ("specs_file", "Specs file to use (e.g. rdimon.specs)", "") + ("specs_file", "Specs file to use (e.g. rdimon.specs)", ""), + ("build_config", "Operator/Data-type/Data-layout configuration to use for tailored ComputeLibrary builds. Can be a JSON file or a JSON formatted string", "") ) env = Environment(platform="posix", variables=vars, ENV = os.environ) @@ -317,6 +320,13 @@ if env['fat_binary']: '-DARM_COMPUTE_ENABLE_FP16', '-DARM_COMPUTE_ENABLE_BF16', '-DARM_COMPUTE_ENABLE_I8MM', '-DARM_COMPUTE_ENABLE_SVEF32MM']) +if env['high_priority'] and env['build_config']: + print("The high priority library cannot be built in conjuction with a user-specified build configuration") + Exit(1) + +if not env['high_priority'] and not env['build_config']: + env.Append(CPPDEFINES = ['ARM_COMPUTE_GRAPH_ENABLED']) + if env['data_type_support']: if any(i in env['data_type_support'] for i in ['all', 'fp16']): env.Append(CXXFLAGS = ['-DENABLE_FP16_KERNELS']) -- cgit v1.2.1