diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-09-16 14:14:21 +0100 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-11-01 09:24:45 +0000 |
commit | 3394f3e3df7fd2d924c41822a8564493fc06473a (patch) | |
tree | 8859ab95e39a237b204031a2aa68cde752003dde /src/gpu/cl/kernels/ClDirectConv2dKernel.cpp | |
parent | 910e3f9b686d16657e37d4c18f234b566c8deec2 (diff) | |
download | ComputeLibrary-3394f3e3df7fd2d924c41822a8564493fc06473a.tar.gz |
Rework direct convolution heuristic on OpenCL
Resolves COMPMID-5634
Change-Id: I075de70d509d0c4430b4bcf3f218384e237a3a56
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/453708
Tested-by: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Comments-Addressed: bsgcomp <bsgcomp@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8473
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Diffstat (limited to 'src/gpu/cl/kernels/ClDirectConv2dKernel.cpp')
-rw-r--r-- | src/gpu/cl/kernels/ClDirectConv2dKernel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp b/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp index fd14f009e1..781627117a 100644 --- a/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp +++ b/src/gpu/cl/kernels/ClDirectConv2dKernel.cpp @@ -242,6 +242,12 @@ void ClDirectConv2dKernel::configure(const CLCompileContext &compile_context, IT build_options.add_option("-DSRC_TENSOR_TYPE=BUFFER"); build_options.add_option("-DSRC_DATA_TYPE=" + get_cl_type_from_data_type(src->data_type())); + build_options.add_option("-DSRC_CHANNELS=" + support::cpp11::to_string(src->dimension(0))); + build_options.add_option("-DSRC_WIDTH=" + support::cpp11::to_string(src->dimension(1))); + build_options.add_option("-DSRC_HEIGHT=" + support::cpp11::to_string(src->dimension(2))); + build_options.add_option("-DDST_CHANNELS=" + support::cpp11::to_string(dst->dimension(0))); + build_options.add_option("-DDST_WIDTH=" + support::cpp11::to_string(dst->dimension(1))); + build_options.add_option("-DDST_HEIGHT=" + support::cpp11::to_string(dst->dimension(2))); build_options.add_option("-DDST_TENSOR_TYPE=BUFFER"); build_options.add_option("-DDST_DATA_TYPE=" + get_cl_type_from_data_type(dst_data_type)); build_options.add_option_if_else(_export_to_cl_image, "-DWEI_TENSOR_TYPE=IMAGE", "-DWEI_TENSOR_TYPE=BUFFER"); |