Skip to content

[inductor]: Not handling ConcatKernel/NopKernel fusions leads to suboptimal fusions #110342

@jon-chuang

Description

@jon-chuang

🚀 The feature, motivation and pitch

Instead, perhaps try to refactor it as ComputedBuffer

Examples: Adamax

Already bad with config.aggressive_fusion = True:
image

Worse when config.aggressive_fusion = False:
image

With config.aggressive_fusion = False, these kernels are treated as not sharing reads/writes.

Further, the presence of these ConcatKernel nodes seems to obstruct fusion of other kernels, despite later being partly pruned away during kernel codegen.

Alternatives

No response

Additional context

No response

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler

Metadata

Metadata

Assignees

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