Skip to content

Commit

Permalink
[OpenCL] Fix vthread_extent for warp size 1 case (apache#10199)
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi authored and ylc committed Feb 16, 2022
1 parent 65f6aa0 commit f1659ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auto_scheduler/search_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ HardwareParams HardwareParamsNode::GetDefaultHardwareParams(const Target& target
<< "Warp size 1 is not recommended for OpenCL devices. Tuning might crash or stuck";
}

int max_vthread_extent = warp_size / 4;
int max_vthread_extent = std::max(1, warp_size / 4);
return HardwareParams(-1, 16, 64, max_shared_memory_per_block, max_local_memory_per_block,
max_threads_per_block, max_vthread_extent, warp_size);
}
Expand Down

0 comments on commit f1659ec

Please sign in to comment.