tmoreau89 commented on a change in pull request #9:
URL: https://github.com/apache/incubator-tvm-vta/pull/9#discussion_r477016190



##########
File path: config/vta_cost.py
##########
@@ -0,0 +1,102 @@
+# cost function for intelfocl 32*32 gemm version
+def cal_cost(insn):
+    """
+    Cal the runtime cost statically
+
+    Parameters
+    ------------
+    insn: the insn (json)
+
+    Returns
+    ------------
+    the cost in s
+    """
+    factor = 1000000.0
+    def alu_imm_cost(iter_out, iter_in, uop_bgn, uop_end):
+        x = (uop_end - uop_bgn) * iter_out * iter_in
+        cycles = x + 46

Review comment:
       Actually I think it would be good to define constants here, and add a 
comment that states that these are set to arbitrarily (e.g. 46).
   
   I'm working with a colleague on making easier to perform some of these cycle 
accurate co-simulation of VTA modules which should help us derive these costs 
more accurately on a per-VTA variant basis. In the meantime, can we use 
constant names, e.g. `ALU_LATENCY_CYCLES = 46`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to