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
2 changes: 1 addition & 1 deletion include/tvm/topi/cuda/reduction.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Schedule ScheduleReduce(const Target& target, Operation op, Schedule sch,
if (out_stage->op.as<ComputeOpNode>()->axis.size() > 0) {
all_reduce = false;
num_thread = 32;
if (target->kind->name == "opencl") {
if (target->kind->name == "opencl" || target->kind->name == "metal") {
// Without this, CL_INVALID_WORK_GROUP_SIZE occurs with python tests.
// Don't know why.
num_thread = 16;
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/topi/cuda/reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _schedule_reduce(op, sch, is_idx_reduce=False):
all_reduce = False
num_thread = 32
target = tvm.target.Target.current()
if target and target.kind.name == "opencl":
if target and (target.kind.name == "opencl" or target.kind.name == "metal"):
# without it, CL_INVALID_WORK_GROUP_SIZE occurred when running test_topi_reduce.py
# don't know why
num_thread = 16
Expand Down