aboutsummaryrefslogtreecommitdiff
path: root/scripts/arm_compute_library_nn_driver.go
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/arm_compute_library_nn_driver.go')
-rw-r--r--scripts/arm_compute_library_nn_driver.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/arm_compute_library_nn_driver.go b/scripts/arm_compute_library_nn_driver.go
index 8ff4f69495..d573c6a14a 100644
--- a/scripts/arm_compute_library_nn_driver.go
+++ b/scripts/arm_compute_library_nn_driver.go
@@ -48,6 +48,17 @@ func globalFlags(ctx android.BaseContext) []string {
}
}
+ data_layouts := strings.Split(ctx.AConfig().GetenvWithDefault("COMPUTE_LIB_DATA_LAYOUT", "ALL"), ",")
+
+ for _, x := range data_layouts {
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "NHWC" {
+ cppflags = append(cppflags, "-DENABLE_NHWC_KERNELS")
+ }
+ if strings.ToUpper(x) == "ALL" || strings.ToUpper(x) == "NCHW" {
+ cppflags = append(cppflags, "-DENABLE_NCHW_KERNELS")
+ }
+ }
+
return cppflags
}