You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/01/25 20:26:39 UTC

[GitHub] [tvm] masahi commented on a change in pull request #7334: [Relay, TOPI] Add numpy style cumsum op

masahi commented on a change in pull request #7334:
URL: https://github.com/apache/tvm/pull/7334#discussion_r564020478



##########
File path: python/tvm/topi/cuda/scan.py
##########
@@ -19,30 +19,36 @@
 import tvm
 from tvm import te
 from tvm._ffi import get_global_func
-from ..transform import expand_dims, squeeze
-from ..utils import ceil_div
+from ..transform import expand_dims, squeeze, transpose, reshape
+from ..utils import ceil_div, swap, prod, get_const_int
 from ..math import cast
 from .. import tag
 from .injective import schedule_injective_from_existing
 
 
-def exclusive_sum_scan2d_ir(data, output, reduction=None):
+binop_name_to_func = {"sum": tvm.tir.generic.add}

Review comment:
       The problem with this is for the thrust path, I need to pass this function to C++ and translate it to `thrust::plus()`, for example. I didn't see a good way to do that, so I opted for a dumb but simpler solution.




----------------------------------------------------------------
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:
users@infra.apache.org