There was an error while loading. Please reload this page.
1 parent 3437f19 commit 3337a1dCopy full SHA for 3337a1d
1 file changed
src/flag_gems/runtime/backend/_iluvatar/ops/bmm.py
@@ -12,12 +12,26 @@
12
logger = logging.getLogger(__name__)
13
14
15
+def prune_bmm_configs(configs, nargs, **kwargs):
16
+ pruned = list(
17
+ filter(
18
+ lambda cfg: not (
19
+ (nargs["M"] < 32 and cfg.kwargs["BLOCK_M"] > 32)
20
+ or (nargs["N"] < 32 and cfg.kwargs["BLOCK_N"] > 32)
21
+ ),
22
+ configs,
23
+ )
24
25
+ return early_config_prune(pruned, nargs, **kwargs)
26
+
27
28
@libentry()
29
@triton.autotune(
30
configs=runtime.get_tuned_config("bmm"),
31
key=["M", "N", "K"],
32
prune_configs_by={
- "early_config_prune": early_config_prune,
33
+ # "early_config_prune": early_config_prune,
34
+ "early_config_prune": prune_bmm_configs,
35
"perf_model": estimate_matmul_time,
36
"top_k": 10,
37
},
0 commit comments