IVGCVSW-2389 WorkloadUtils: Add profiling to tensor mapping.
authorSadik Armagan <sadik.armagan@arm.com>
Mon, 24 Dec 2018 09:01:31 +0000 (09:01 +0000)
committerMatthew Bentham <matthew.bentham@arm.com>
Mon, 31 Dec 2018 14:09:20 +0000 (14:09 +0000)
Change-Id: Ibe1b27b268011878c7dce3c96efea01402453027

src/backends/backendsCommon/WorkloadUtils.hpp

index b7e0e06..2b07b2b 100644 (file)
@@ -86,8 +86,13 @@ void CopyTensorContentsGeneric(const ITensorHandle* srcTensor, ITensorHandle* ds
                  dstChannelStride,
                  dstBatchStride);
 
-    auto srcData = static_cast<const uint8_t*>(srcTensor->Map());
-    auto dstData = static_cast<uint8_t*>(dstTensor->Map());
+    const unsigned char* srcData;
+    unsigned char* dstData;
+    {
+        ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "Synchronize buffers");
+        srcData = static_cast<const uint8_t *>(srcTensor->Map());
+        dstData = static_cast<uint8_t *>(dstTensor->Map());
+    }
 
     size_t copyLength = std::min(srcWidth*srcWidthStride, dstWidth*dstWidthStride);
     size_t copyHeight = std::min(srcHeight, dstHeight);