masahi commented on a change in pull request #8571:
URL: https://github.com/apache/tvm/pull/8571#discussion_r678854282
##########
File path: tests/python/unittest/test_tir_ir_builder.py
##########
@@ -554,6 +554,147 @@ def check_target(target):
check_target(target)
[email protected]_gpu
+def test_matmul_dyn_shared():
+ n = 1024
+ A = te.placeholder((n, n), name="A", dtype="float16")
+ B = te.placeholder((n, n), name="B", dtype="float16")
+
+ def syncthread():
+ return tvm.tir.Call(None, "tir.tvm_storage_sync",
tvm.runtime.convert(["shared"]))
+
+ def test_matmul_ir(A, B, C):
+ ib = tvm.tir.ir_builder.create()
+ block = 16
+
+ tx = te.thread_axis("threadIdx.x")
+ ty = te.thread_axis("threadIdx.y")
+ bx = te.thread_axis("blockIdx.x")
+ by = te.thread_axis("blockIdx.y")
+ ib.scope_attr(tx, "thread_extent", block)
+ ib.scope_attr(ty, "thread_extent", block)
+ ib.scope_attr(bx, "thread_extent", n / block)
Review comment:
`n` is divisible by `block` in this test, but yes, `n // block` is more
correct. Updated.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]