Skip to content

Cleanup the scaling logic in runtime.triton_heuristics.triton_config #138743

@shunting314

Description

@shunting314

🐛 Describe the bug

In runtime.triton_heuristics.triton_config , we will scale the passed in XBLOCK, YBLOCK, ZBLOCK value according to various rules

  • cap them with xnumel, ynumel, znumel
  • scaling block size up when numel are large
  • scaling XBLOCK up when the min_elem_per_thread requries so
  • etc.

These scaling rules may cause issues. Here is one example: #138730

We should find time to clean them up.

Error logs

No response

Minified repro

No response

Versions

.

cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @aakhundov

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: inductoroncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions