We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c50e86 commit 69dd5bcCopy full SHA for 69dd5bc
3 files changed
examples/batchmatmul.jl
@@ -74,7 +74,7 @@ function prepare(; benchmark::Bool=false,
74
)
75
end
76
77
-function run(data; tm::Int=64, tn::Int=64, tk::Int=64, nruns::Int=1, warmup::Int=0)
+function run(data; tm::Int=128, tn::Int=128, tk::Int=64, nruns::Int=1, warmup::Int=0)
78
(; A, B, C, M, N, Batch) = data
79
grid = (cld(M, tm), cld(N, tn), Batch)
80
examples/batchmatmul.py
@@ -29,6 +29,11 @@ def batchmatmul_cutile_kernel(A, B, C, tm: ct.Constant[int], tn: ct.Constant[int
29
b = ct.load(B, index=(pid_batch, k, bidy), shape=(1, tk, tn), padding_mode=zero_pad)
30
b = ct.reshape(b, (tk, tn))
31
32
+ # Convert to TF32 for tensor cores (Float32 inputs only)
33
+ if A.dtype == ct.float32:
34
+ a = ct.astype(a, ct.tfloat32)
35
+ b = ct.astype(b, ct.tfloat32)
36
+
37
accumulator = ct.mma(a, b, acc=accumulator)
38
39
result = ct.astype(accumulator, C.dtype)
@@ -61,7 +66,7 @@ def prepare(*, benchmark: bool = False, Batch: int = None, M: int = None, K: int
61
66
}
62
67
63
68
64
-def run(data, *, tm: int = 64, tn: int = 64, tk: int = 64, nruns: int = 1, warmup: int = 0):
69
+def run(data, *, tm: int = 128, tn: int = 128, tk: int = 64, nruns: int = 1, warmup: int = 0):
65
70
"""Run batch matmul kernel with timing."""
71
A, B, C = data["A"], data["B"], data["C"]
72
Batch, M, N = data["Batch"], data["M"], data["N"]
examples/transpose.py
@@ -12,7 +12,7 @@ def transpose_cutile_kernel(input, output, tile_m: ct.Constant[int], tile_n: ct.
12
pid_m = ct.bid(0)
13
pid_n = ct.bid(1)
14
tile = ct.load(input, index=(pid_m, pid_n), shape=(tile_m, tile_n))
15
- tile_t = transpose(tile)
+ tile_t = ct.transpose(tile)
16
ct.store(output, index=(pid_n, pid_m), tile=tile_t)
17
18
0 commit comments