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
3 changes: 3 additions & 0 deletions python/tvm/dlight/gpu/general_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def apply( # pylint: disable=too-many-locals
if target.kind.name == "cuda":
len_tx = 256
unroll_depth = 256
elif target.kind.name == "opencl":
len_tx = 256
unroll_depth = 64
else:
len_tx = 64
unroll_depth = 64
Expand Down
2 changes: 2 additions & 0 deletions python/tvm/dlight/gpu/rmsnorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def apply( # pylint: disable=too-many-locals,missing-docstring
) -> tir.Schedule:
if target.kind.name == "cuda":
num_tx = 512
elif target.kind.name == "opencl":
num_tx = 256
else:
num_tx = 64

Expand Down
4 changes: 4 additions & 0 deletions python/tvm/dlight/gpu/transpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def apply( # pylint: disable=too-many-locals
len_tx = 16
len_ty = 8
unroll_depth = 256
elif target.kind.name == "opencl":
len_tx = 16
len_ty = 8
unroll_depth = 64
else:
len_tx = 8
len_ty = 4
Expand Down
2 changes: 2 additions & 0 deletions python/tvm/dlight/gpu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def suggest_threads_per_block(
threads = 256
elif target.kind.name == "metal":
threads = 256
elif target.kind.name == "opencl":
threads = 256
else:
threads = 64
results: List[Optional[int]] = []
Expand Down