wpan11nv commented on a change in pull request #5193: [TE] Support mixing
normal and cross-thread reduction
URL: https://github.com/apache/incubator-tvm/pull/5193#discussion_r401264115
##########
File path: tests/python/unittest/test_target_codegen_cuda.py
##########
@@ -321,6 +321,33 @@ def check_cuda(dtype, m=32, n=32):
check_cuda("float32")
check_cuda("float16")
+def test_cuda_mix_threaded_and_normal_reduction():
+ def check_cuda(dtype, m=32, n=32):
+ if not tvm.gpu(0).exist or not tvm.runtime.enabled("cuda"):
+ print("skip because cuda is not enabled..")
+ return
+ if dtype == "float16" and not have_fp16(tvm.gpu(0).compute_version):
+ print("Skip because gpu does not have fp16 support")
+ return
+
+ a = tvm.te.placeholder((m, n), name="a", dtype=dtype)
+ b = topi.sum(a)
+ with tvm.target.cuda():
+ sb = tvm.te.create_schedule(b.op)
+ i, j = b.op.reduce_axis
Review comment:
i, j == > i, _
----------------------------------------------------------------
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]
With regards,
Apache Git Services