Skip to content

Move yz_grid disabling logic to ConfigSpec #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions helion/_compiler/device_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,9 @@ def lower_to_device_ir(func: HostFunction) -> DeviceIR:
remove_unnecessary_tile_index(graph.graph)
remove_unnecessary_masking(graph.graph)
device_ir.build_rolled_reductions()
if len(device_ir.root_ids) > 1:
# yz_grid not supported with shared program IDs
CompileEnvironment.current().config_spec.allow_use_yz_grid = False
return device_ir


Expand Down
3 changes: 0 additions & 3 deletions helion/_compiler/tile_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,6 @@ def codegen_grid(self, state: CodegenState) -> DeviceGridState:
env = CompileEnvironment.current()
block_sizes = self.block_size
assert len(block_sizes) == len(block_ids)
if isinstance(state.device_function.pid, SharedProgramID):
# Disable for shared pid
self.fn.config.config["use_yz_grid"] = False
pids = self.select_pid_strategy()
if isinstance(state.device_function.pid, SharedProgramID):
pids.shared_pid_var = state.device_function.pid.shared_pid_var
Expand Down
Loading