diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index d5461afe42..5d2002a45d 100644 --- a/SConstruct +++ b/SConstruct @@ -68,6 +68,7 @@ vars.AddVariables( PathVariable("external_tests_dir", "Add examples, benchmarks and tests to the tests suite", "", PathVariable.PathAccept), ListVariable("custom_options", "Custom options that can be used to turn on/off features", "none", ["disable_mmla_fp"]), ListVariable("data_type_support", "Enable a list of data types to support", "all", ["qasymm8", "qasymm8_signed", "qsymm16", "fp16", "fp32", "integer"]), + ListVariable("data_layout_support", "Enable a list of data layout to support", "all", ["nhwc", "nchw"]), ("toolchain_prefix", "Override the toolchain prefix", ""), ("compiler_prefix", "Override the compiler prefix", ""), ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""), @@ -315,6 +316,12 @@ if env['data_type_support']: if any(i in env['data_type_support'] for i in ['all', 'integer']): env.Append(CXXFLAGS = ['-DENABLE_INTEGER_KERNELS']) +if env['data_layout_support']: + if any(i in env['data_layout_support'] for i in ['all', 'nhwc']): + env.Append(CXXFLAGS = ['-DENABLE_NHWC_KERNELS']) + if any(i in env['data_layout_support'] for i in ['all', 'nchw']): + env.Append(CXXFLAGS = ['-DENABLE_NCHW_KERNELS']) + if env['standalone']: env.Append(CXXFLAGS = ['-fPIC']) env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++']) |