APPBROWSER-359: Sync tensor in GC benchmark tests

Change-Id: I22c1aa92e70d6143bbcec90e9e7de9f1ce1c1e55
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/114635
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
diff --git a/tests/benchmark/fixtures/FlattenLayerFixture.h b/tests/benchmark/fixtures/FlattenLayerFixture.h
index 67f5f01..f6e44a2 100644
--- a/tests/benchmark/fixtures/FlattenLayerFixture.h
+++ b/tests/benchmark/fixtures/FlattenLayerFixture.h
@@ -68,6 +68,12 @@
         flatten_func.run();
     }
 
+    void sync()
+    {
+        sync_if_necessary<TensorType>();
+        sync_tensor_if_necessary<TensorType>(dst);
+    }
+
     void teardown()
     {
         src.allocator()->free();