Skip to content

Commit

Permalink
[Target] Add MetaSchedule-compatible attributes to OpenCL (#15166)
Browse files Browse the repository at this point in the history
MetaSchedule prefers `max_threads_per_block` and
`max_shared_memory_per_block` for GPU targets.

Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
  • Loading branch information
junrushao and spectrometerHBH authored Jun 27, 2023
1 parent 55df810 commit 48f295f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/target/target_kind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ TVM_REGISTER_TARGET_KIND("rocm", kDLROCM)
.set_target_parser(UpdateROCmAttrs);

TVM_REGISTER_TARGET_KIND("opencl", kDLOpenCL)
.add_attr_option<Integer>("max_threads_per_block", Integer(256))
.add_attr_option<Integer>("max_shared_memory_per_block", Integer(16384))
.add_attr_option<Integer>("max_num_threads", Integer(256))
.add_attr_option<Integer>("thread_warp_size", Integer(1))
.add_attr_option<Integer>("texture_spatial_limit", Integer(16384))
Expand Down

0 comments on commit 48f295f

Please sign in to comment.