From 700e707cc1059a5dc5f3bae263e70b2cf06b707c Mon Sep 17 00:00:00 2001
From: Maria Kotsifakou <kotsifa2@illinois.edu>
Date: Mon, 14 Oct 2019 13:34:48 -0500
Subject: [PATCH] Fixed patch factor for profling in tensor runtime

---
 .../hpvm-tensor-rt/tensor_runtime/src/tensor_runtime.cu        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/tensor_runtime.cu b/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/tensor_runtime.cu
index 67c56aec3c..54a3bed286 100644
--- a/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/tensor_runtime.cu
+++ b/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/tensor_runtime.cu
@@ -1691,7 +1691,8 @@ void* wrapper_ConvLayer(const char* hpvm_node_id,
                            conv_stride_h, //s_h
                            conv_stride_w, //s_w
                            param, //voltage_swing
-                           1 /*patch_factor*/);
+                           filter_tensor_cast->dims.dim_sizes[2] *
+                             filter_tensor_cast->dims.dim_sizes[3] /*patch_factor: k_h*k_w*/);
         RC->addToCurrentIterationComputeTime("ConvLayer_PROMISE", pinfo.first);
         RC->addToCurrentIterationComputeEnergy("ConvLayer_PROMISE", pinfo.second);
         void* t_out;
-- 
GitLab