This is an automated email from the ASF dual-hosted git repository.

syfeng pushed a commit to branch test_all_cases_on_unity
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 6c925a0498837c7d5da44ece56f386145e97eb26
Author: Siyuan Feng <[email protected]>
AuthorDate: Sun Jan 21 18:27:44 2024 +0800

    fix thread dtype mismatch
---
 python/tvm/topi/cuda/scatter_elements.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/topi/cuda/scatter_elements.py 
b/python/tvm/topi/cuda/scatter_elements.py
index 2f345b9d67..27567ea23e 100644
--- a/python/tvm/topi/cuda/scatter_elements.py
+++ b/python/tvm/topi/cuda/scatter_elements.py
@@ -168,7 +168,7 @@ def gen_ir(data, indices, updates, out, axis, reduce_func):
     max_threads = 
int(tvm.target.Target.current(allow_none=False).max_num_threads)
     # Copy initial input data to output
     with ib.new_scope():
-        num_blocks = ceil_div(full_range, max_threads)
+        num_blocks = cast(ceil_div(full_range, max_threads), "int32")
         bx = te.thread_axis("blockIdx.x")
         tx = te.thread_axis("threadIdx.x")
         ib.scope_attr(bx, "thread_extent", num_blocks)

Reply via email to