Skip to content

Commit 535b48d

Browse files
committed
Fix bmm issue
1 parent 92a039c commit 535b48d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/tilegym/ops/__init__.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,19 @@
1010
# Import interface modules
1111
from . import activation
1212
from . import attn_interface
13-
from . import cutile
13+
14+
# Make cutile optional - only import if backend is fully available
15+
if is_backend_available("cutile"):
16+
try:
17+
from . import cutile
18+
except (ImportError, RuntimeError):
19+
import warnings
20+
21+
warnings.warn("Cutile backend import failed, cutile operations will not be available")
22+
cutile = None # type: ignore
23+
else:
24+
cutile = None # type: ignore
25+
1426
from . import moe_interface
1527

1628
# Re-export key interfaces
@@ -26,7 +38,6 @@
2638
__all__ = [
2739
# Export all operations from ops module
2840
# Backend implementations
29-
"cutile",
3041
# Interface modules
3142
"attn_interface",
3243
"moe_interface",
@@ -38,3 +49,7 @@
3849
"mla_decoding_interface",
3950
"fused_moe_kernel_interface",
4051
]
52+
53+
# Add cutile to exports only if successfully imported
54+
if cutile is not None:
55+
__all__.append("cutile")

src/tilegym/ops/cutile/bmm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ def grid_fn(cfg):
271271
"occupancy": cfg.occupancy,
272272
},
273273
search_space=_bmm_autotune_configs,
274+
compiler_time_limit_sec=30,
274275
)
275276

276277
return output

0 commit comments

Comments
 (0)