comaniac commented on a change in pull request #7297:
URL: https://github.com/apache/tvm/pull/7297#discussion_r560599941
##########
File path: python/tvm/topi/cuda/dense.py
##########
@@ -44,6 +44,8 @@ def dense_cublas(cfg, data, weight, bias=None,
out_dtype=None):
matmul = cublas.matmul(data, weight, False, True)
if isinstance(batch, int):
cfg.add_flop(batch * in_dim * out_dim * 2)
+ else:
+ cfg.add_flop(batch.value * in_dim * out_dim * 2)
Review comment:
Ah it turns out that you may get Var in the case of dynamic shape. For
other TOPI templates, many of them just ignore the flops when the shape is
dynamic. You could do the same.
----------------------------------------------------------------
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]