Skip to content

custom config filter#1847

Open
shunting314 wants to merge 3 commits intoshunting314/stack/24from
shunting314/stack/25
Open

custom config filter#1847
shunting314 wants to merge 3 commits intoshunting314/stack/24from
shunting314/stack/25

Conversation

@shunting314
Copy link
Copy Markdown
Contributor

@shunting314 shunting314 commented Mar 27, 2026

Stacked PRs:


custom config filter

Motivations

  1. user may want to be aggressively filter small block sizes for their kernel but don't want to make such call for all kernels
  2. would be handy to do investigation like avoid TMA here not use TMA for symm mem tensor #1846

shunting314 added a commit that referenced this pull request Mar 27, 2026
stack-info: PR: #1847, branch: shunting314/stack/25
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from 7adea7c to 5686af9 Compare March 27, 2026 21:20
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 27, 2026
@shunting314 shunting314 requested review from jansel and yf225 March 27, 2026 21:21
@shunting314 shunting314 marked this pull request as draft March 27, 2026 22:05
@shunting314 shunting314 changed the base branch from shunting314/stack/21 to main March 27, 2026 22:05
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from 5686af9 to fa8e33f Compare March 27, 2026 22:05
@shunting314 shunting314 changed the base branch from main to shunting314/stack/21 March 27, 2026 22:05
@shunting314 shunting314 marked this pull request as ready for review March 27, 2026 22:05
@jansel
Copy link
Copy Markdown
Contributor

jansel commented Mar 28, 2026

Could we use autotune_config_overrides for this?

@yf225
Copy link
Copy Markdown
Contributor

yf225 commented Mar 30, 2026

related discussion: #1415

@shunting314
Copy link
Copy Markdown
Contributor Author

shunting314 commented Mar 31, 2026

Could we use autotune_config_overrides for this?

I think they target different things.

autotune_config_overrides would override fields of a helion.Config. It does not drop a hl.Config entirely during autotuning.

While the custom config filter can ignore configs either because block-size is too small or we want to avoid using TMA for some reasons.

The filter can cover all cases mentioned in #1415 btw

@jansel
Copy link
Copy Markdown
Contributor

jansel commented Apr 1, 2026

Maybe we could extend the existing API? Another other ideas considered?

@shunting314
Copy link
Copy Markdown
Contributor Author

Maybe we could extend the existing API? Another other ideas considered?

I think a filter function is more flexible then an overriding dict. We can do more things with the filter function. E.g. with overriding function, we can not skip config with too small block size.

One idea to consolidate the two APIs is, we let the filter function return Config | None rather than bool. If the filter return None, autotuner ignore the config; if the filter function returns a Config, it would be a potentially changed Config with overriding. Basically the filter function provides a super set functionality of the existing config overriding API. wdyt?

@shunting314 shunting314 marked this pull request as draft April 1, 2026 19:16
@shunting314 shunting314 changed the base branch from shunting314/stack/21 to main April 1, 2026 19:16
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from fa8e33f to aa95dba Compare April 1, 2026 19:16
@shunting314 shunting314 changed the base branch from main to shunting314/stack/21 April 1, 2026 19:17
@shunting314 shunting314 marked this pull request as ready for review April 1, 2026 19:17
@shunting314 shunting314 marked this pull request as draft April 1, 2026 19:19
@shunting314 shunting314 changed the base branch from shunting314/stack/21 to main April 1, 2026 19:19
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from aa95dba to a42cffc Compare April 1, 2026 19:19
@shunting314 shunting314 changed the base branch from main to shunting314/stack/21 April 1, 2026 19:19
@shunting314 shunting314 marked this pull request as ready for review April 1, 2026 19:19
@shunting314 shunting314 marked this pull request as draft April 1, 2026 22:37
@shunting314 shunting314 changed the base branch from shunting314/stack/21 to main April 1, 2026 22:37
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from a42cffc to 704fec4 Compare April 1, 2026 22:37
@shunting314 shunting314 changed the base branch from main to shunting314/stack/21 April 1, 2026 22:37
@shunting314 shunting314 marked this pull request as ready for review April 1, 2026 22:37
@shunting314 shunting314 marked this pull request as draft April 2, 2026 18:02
@shunting314 shunting314 changed the base branch from shunting314/stack/21 to main April 2, 2026 18:02
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from 704fec4 to 98ab5e0 Compare April 2, 2026 18:02
@shunting314 shunting314 changed the base branch from main to shunting314/stack/24 April 2, 2026 18:03
@shunting314 shunting314 marked this pull request as ready for review April 2, 2026 18:03
stack-info: PR: #1909, branch: shunting314/stack/28
@shunting314 shunting314 marked this pull request as draft April 2, 2026 18:10
@shunting314 shunting314 changed the base branch from shunting314/stack/24 to main April 2, 2026 18:10
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from 98ab5e0 to b313874 Compare April 2, 2026 18:10
@shunting314 shunting314 changed the base branch from main to shunting314/stack/24 April 2, 2026 18:11
@shunting314 shunting314 marked this pull request as ready for review April 2, 2026 18:11
stack-info: PR: #1842, branch: shunting314/stack/24
stack-info: PR: #1847, branch: shunting314/stack/25
@shunting314 shunting314 marked this pull request as draft April 2, 2026 18:35
@shunting314 shunting314 changed the base branch from shunting314/stack/24 to main April 2, 2026 18:35
@shunting314 shunting314 force-pushed the shunting314/stack/25 branch from b313874 to 4aec4fc Compare April 2, 2026 18:36
@shunting314 shunting314 changed the base branch from main to shunting314/stack/24 April 2, 2026 18:36
@shunting314 shunting314 marked this pull request as ready for review April 2, 2026 18:36
@shunting314 shunting314 force-pushed the shunting314/stack/24 branch from 17fc723 to 5fb5b3a Compare April 2, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants