arm_compute v20.11
diff --git a/scripts/arm_compute_library_nn_driver.go b/scripts/arm_compute_library_nn_driver.go
index 553503f..9413edf 100644
--- a/scripts/arm_compute_library_nn_driver.go
+++ b/scripts/arm_compute_library_nn_driver.go
@@ -8,6 +8,7 @@
import (
"android/soong/android"
"android/soong/cc"
+ "strings"
)
func globalFlags(ctx android.BaseContext) []string {
@@ -21,6 +22,29 @@
cppflags = append(cppflags, "-fno-addrsig")
}
+ data_types := strings.Split(ctx.AConfig().GetenvWithDefault("COMPUTE_LIB_DATA_TYPE", "ALL"), ",")
+
+ for _, x := range data_types {
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "QASYMM8" {
+ cppflags = append(cppflags, "-DENABLE_QASYMM8_KERNELS")
+ }
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "QASYMM8_SIGNED" {
+ cppflags = append(cppflags, "-DENABLE_QASYMM8_SIGNED_KERNELS")
+ }
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "QASYMM16" {
+ cppflags = append(cppflags, "-DENABLE_QASYMM16_KERNELS")
+ }
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "QSYMM16" {
+ cppflags = append(cppflags, "-DENABLE_QSYMM16_KERNELS")
+ }
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "FP16" {
+ cppflags = append(cppflags, "-DENABLE_FP16_KERNELS")
+ }
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "FP32" {
+ cppflags = append(cppflags, "-DENABLE_FP32_KERNELS")
+ }
+ }
+
return cppflags
}
diff --git a/scripts/clang_tidy_rules.py b/scripts/clang_tidy_rules.py
index 5e13aa0..ce467f8 100755
--- a/scripts/clang_tidy_rules.py
+++ b/scripts/clang_tidy_rules.py
@@ -111,11 +111,15 @@
("NEWinogradLayerKernel.cpp" in line and "use '= default' to define a trivial destructor" in line) or
("NEGEMMLowpMatrixMultiplyCore.cpp" in line and "constructor does not initialize these fields" in line) or
("NEGEMMLowpAssemblyMatrixMultiplyCore" in line and "constructor does not initialize these fields" in line) or
+ ("NEDepthwiseConvolutionLayerNativeKernel" in line and re.search(r"parameter '[^']+' is unused", line)) or
+ ("NEDepthwiseConvolutionAssemblyDispatch" in line and re.search(r"parameter '[^']+' is unused", line)) or
("CPUUtils.cpp" in line and "consider replacing 'unsigned long' with 'uint64'" in line) or
("CPUUtils.cpp" in line and "parameter 'cpusv' is unused" in line) or
("CPUUtils.cpp" in line and "warning: uninitialized record type" in line) or
("GCKernelLibrary.cpp" in line and "warning: do not declare C-style arrays" in line) or
("Utils.h" in line and "warning: Use of zero-allocated memory" in line) or
+ ("NEDepthwiseConvolutionLayerNativeKernel.cpp" in line and "misc-non-private-member-variables-in-classes" in line) or # This is to prevent false positive, should be reassessed with the newer clang-tidy
+ ("NEDepthwiseConvolutionLayerNativeKernel.cpp" in line and "cppcoreguidelines-pro-type-member-init" in line) or # This is to prevent false positive, should be reassessed with the newer clang-tidy
"3rdparty" in line):
print_context=False
continue
diff --git a/scripts/include_functions_kernels.py b/scripts/include_functions_kernels.py
index 074f794..4db47ea 100755
--- a/scripts/include_functions_kernels.py
+++ b/scripts/include_functions_kernels.py
@@ -3,15 +3,29 @@
import collections
import os
-Target = collections.namedtuple('Target', 'name prefix')
-
-targets = [Target("NEON", "NE"), Target("CL", "CL"), Target("CPP", "CPP"), Target("GLES_COMPUTE", "GC")]
-
armcv_path = "arm_compute"
-core_path = armcv_path + "/core/"
-runtime_path = armcv_path + "/runtime/"
-include_str = "#include \""
+src_path ="src"
+Target = collections.namedtuple('Target', 'name prefix basepath')
+
+core_targets = [
+ Target("NEON", "NE", src_path), # NEON kernels are under src
+ Target("CL", "CL", src_path), # CL kernels are under src
+ Target("CPP", "CPP", armcv_path), # CPP kernels are under arm_compute
+ Target("GLES_COMPUTE", "GC", armcv_path) # GLES kernels are under arm_compute
+ ]
+
+# All functions are under arm_compute
+runtime_targets = [
+ Target("NEON", "NE", armcv_path),
+ Target("CL", "CL", armcv_path),
+ Target("CPP", "CPP", armcv_path),
+ Target("GLES_COMPUTE", "GC", armcv_path)
+ ]
+
+core_path = "/core/"
+runtime_path = "/runtime/"
+include_str = "#include \""
def read_file(file):
with open(file, "r") as f:
@@ -43,9 +57,9 @@
return updated_files
-def include_components(path, header_prefix, folder, subfolders=None):
- for t in targets:
- target_path = path + t.name + "/"
+def include_components(target, path, header_prefix, folder, subfolders=None):
+ for t in target:
+ target_path = t.basepath + path + t.name + "/"
components_file = target_path + t.prefix + header_prefix
if os.path.exists(components_file):
include_list = create_include_list(target_path + folder)
@@ -60,7 +74,7 @@
if __name__ == "__main__":
# Include kernels
- include_components(core_path, "Kernels.h", "kernels", ["arm32", "arm64"])
+ include_components(core_targets, core_path, "Kernels.h", "kernels", ["arm32", "arm64"])
# Include functions
- include_components(runtime_path, "Functions.h", "functions")
+ include_components(runtime_targets, runtime_path, "Functions.h", "functions")