aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2023-05-16 16:46:34 +0100
committerSiCong Li <sicong.li@arm.com>2023-07-04 09:06:41 +0000
commit19844f605f5e5b71d05164711dee13f8652adafe (patch)
tree99aa1242a37aefda01e4284bc48c63f93f625258 /SConstruct
parent2f0ef00cc092b5eff901debee0c3f5a38114f40a (diff)
downloadComputeLibrary-19844f605f5e5b71d05164711dee13f8652adafe.tar.gz
Add Kernel Writer driver code to dynamic fusion
* Partially port ElementwiseBinary component to ckw (broadcast not supported yet) * Port Store component to ckw * Move KernelArgumentsHelpers to ckw_driver/ as it's only used by the driver ckw_driver is a middle layer between dynamic fusion and Compute Kernel Writer (CKW). It consumes the fused kernel component stream produced by Dynamic Fusion and uses CKW to write the kernel code complete with all meta info needed by the runtime to enqueue the kernel. It consists of two parts: * Kernel writing: This resides in dynamic_fusion/sketch * Runtime utilities: This resides in dynamic_fusion/runtime The integration (separation between DF and CKW) occurs in two places: * Inside GpuCKWDriver global driver that coordinates how the final fused kernel code is assembled together alongwith other meta info needed by runtime. * Inside each instantiated IGpuCKWComponentDriver component driver that drives CKW to write component-specific code or do component-specific configurations Partially resolves: COMPMID-5792 COMPMID-6282 COMPMID-6260 COMPMID-6266 Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: Ib57a080a65fe8cfee1a8df1529fe572005a6d2f2 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9847 Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct6
1 files changed, 2 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index 48f17472d3..4994972172 100644
--- a/SConstruct
+++ b/SConstruct
@@ -102,7 +102,6 @@ vars.AddVariables(
BoolVariable("standalone", "Builds the tests as standalone executables, links statically with libgcc, libstdc++ and libarm_compute", False),
BoolVariable("opencl", "Enable OpenCL support", True),
BoolVariable("neon", "Enable Arm® Neon™ support", False),
- BoolVariable("ckw", "Build and link the Compute Kernel Writer subproject", False),
BoolVariable("embed_kernels", "Enable if you want the OpenCL kernels to be built in the library's binaries instead of being read from separate '.cl' / '.cs' files. If embed_kernels is set to 0 then the application can set the path to the folder containing the OpenCL kernel files by calling CLKernelLibrary::init(). By default the path is set to './cl_kernels'.", True),
BoolVariable("compress_kernels", "Compress embedded OpenCL kernels in library binary using zlib. Useful for reducing the binary size. embed_kernels should be enabled", False),
BoolVariable("set_soname", "If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects. (requires SCons 2.4 or above)", False),
@@ -126,7 +125,7 @@ vars.AddVariables(
    ├── datasets
    ├── fixtures
    └── Neon\n""", "", PathVariable.PathAccept),
- BoolVariable("experimental_dynamic_fusion", "Build the experimental dynamic fusion files. This option also enables opencl=1 and ckw=1 on which it has a direct dependency.", False),
+ BoolVariable("experimental_dynamic_fusion", "Build the experimental dynamic fusion files. This option also enables opencl=1 on which it has a direct dependency.", False),
BoolVariable("fixed_format_kernels", "Enable fixed format kernels for GEMM", False),
BoolVariable("mapfile", "Generate a map file", False),
ListVariable("custom_options", "Custom options that can be used to turn on/off features", "none", ["disable_mmla_fp"]),
@@ -218,7 +217,6 @@ if env['os'] == 'bare_metal':
if env['experimental_dynamic_fusion']:
# Dynamic Fusion on GPU has a direct dependency on OpenCL and Compute Kernel Writer
env['opencl'] = 1
- env['ckw'] = 1
if env['opencl'] and env['embed_kernels'] and env['compress_kernels'] and env['os'] not in ['android']:
print("Compressed kernels are supported only for android builds")
@@ -422,7 +420,7 @@ print("CC", env['CC'])
print("CXX", env['CXX'])
"""Build the Compute Kernel Writer subproject"""
-if env['ckw']:
+if env['experimental_dynamic_fusion']:
# Strip ccache prefix from CC and CXX to obtain only the target triple
CKW_CC = env['CC'].replace(env['compiler_cache'] + " ", "")
CKW_CXX = env['CXX'].replace(env['compiler_cache'] + " ", "")