Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions python/tvm/dlight/gpu/low_batch_gemv.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def apply(
sch.set_scope(block, 0, "shared")
_, _, _, *s = sch.get_loops(epilogue) # pylint: disable=invalid-name
_, tx = sch.split(sch.fuse(*s), factors=[None, TX])
sch.bind(tx, "threadIdx.x")
sch.bind(tx, TAG_S)
else:
sch.reverse_compute_at(epilogue, bx, preserve_unit_loops=True)
ts_tile_s = sch.fuse(*sch.get_loops(epilogue)[3:])
Expand Down Expand Up @@ -538,17 +538,16 @@ def apply(
else:
TS, TR = 16, 32
elif target.kind.name == "metal":
# Note that the following tile size is tuned on M2 Ultra for 7B
TAG_S, TAG_R = "threadIdx.x", "threadIdx.y"
VEC_C = 1
VEC_C = 4
LOAD_V_SHARED = False
LOAD_V_VEC = -1
UNROLL = 256
UNROLL = 8
if isinstance(len_S, int):
if len_S > len_R:
TS, TR = 2, 32
TS, TR = 8, 32
else:
TS, TR = 2, 64
TAG_S, TAG_R = "threadIdx.x", "threadIdx.y"
TS, TR = 8, 32
elif target.kind.name == "rocm":
VEC_C = 4
LOAD_V_SHARED = True
Expand Down
Loading