From 3fcf3dcf7b6ffc613468ccaca580bde495677440 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Wed, 17 May 2023 15:17:48 +0100 Subject: Add multi-sketch support for dynamic fusion * Tensors are owned by workload context instead of workload sketch so that they can be used by multiple sketches. * Add an integration test for multi-sketch case. Resolves: COMPMID-6148 Signed-off-by: Viet-Hoa Do Change-Id: I37d0de5ac103fb2a85020aa1c26e49eb304f47b7 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9706 Comments-Addressed: Arm Jenkins Reviewed-by: SiCong Li Tested-by: Arm Jenkins Benchmark: Arm Jenkins --- tests/validation/dynamic_fusion/gpu/cl/DepthwiseConv2d.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/validation/dynamic_fusion/gpu/cl/DepthwiseConv2d.cpp') diff --git a/tests/validation/dynamic_fusion/gpu/cl/DepthwiseConv2d.cpp b/tests/validation/dynamic_fusion/gpu/cl/DepthwiseConv2d.cpp index b6331d70c8..7ab7c8a3fc 100644 --- a/tests/validation/dynamic_fusion/gpu/cl/DepthwiseConv2d.cpp +++ b/tests/validation/dynamic_fusion/gpu/cl/DepthwiseConv2d.cpp @@ -242,12 +242,12 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zi input_info, weights_info, biases_info, padding, stride, depth_multiplier, dilation, expected) { CLCompileContext cl_compile_ctx = CLKernelLibrary::get().get_compile_context(); - GpuWorkloadContext gpu_ctx = GpuWorkloadContext{ &cl_compile_ctx }; - GpuWorkloadSketch sketch{ &gpu_ctx }; + GpuWorkloadContext context = GpuWorkloadContext{ &cl_compile_ctx }; + GpuWorkloadSketch sketch{ &context }; - const TensorInfo sketch_input_info = sketch.create_tensor_info(input_info); - const TensorInfo sketch_weights_info = sketch.create_tensor_info(weights_info); - const TensorInfo sketch_biases_info = sketch.create_tensor_info(biases_info); + const TensorInfo sketch_input_info = context.create_tensor_info(input_info); + const TensorInfo sketch_weights_info = context.create_tensor_info(weights_info); + const TensorInfo sketch_biases_info = context.create_tensor_info(biases_info); DepthwiseConv2dAttributes attributes {}; attributes.pad(padding) -- cgit v1.2.1