Skip to content

[Helion + torch.compile] Enable torch.compile fusion tests#1727

Merged
yf225 merged 1 commit intomainfrom
yf225/stack/74
Mar 23, 2026
Merged

[Helion + torch.compile] Enable torch.compile fusion tests#1727
yf225 merged 1 commit intomainfrom
yf225/stack/74

Conversation

@yf225
Copy link
Copy Markdown
Contributor

@yf225 yf225 commented Mar 16, 2026

No description provided.

yf225 added a commit that referenced this pull request Mar 16, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 16, 2026
@yf225 yf225 marked this pull request as draft March 16, 2026 22:36
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 16, 2026 22:36
yf225 added a commit that referenced this pull request Mar 16, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 16, 2026 22:36
@yf225 yf225 marked this pull request as ready for review March 16, 2026 22:36
@yf225 yf225 marked this pull request as draft March 16, 2026 22:44
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 16, 2026 22:44
yf225 added a commit that referenced this pull request Mar 16, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 16, 2026 22:44
@yf225 yf225 marked this pull request as ready for review March 16, 2026 22:44
yf225 added a commit that referenced this pull request Mar 16, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 marked this pull request as draft March 16, 2026 23:46
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 16, 2026 23:46
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 16, 2026 23:46
@yf225 yf225 marked this pull request as ready for review March 16, 2026 23:46
yf225 added a commit that referenced this pull request Mar 16, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 marked this pull request as draft March 17, 2026 00:00
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 17, 2026 00:01
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 17, 2026 00:01
@yf225 yf225 marked this pull request as ready for review March 17, 2026 00:01
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 17, 2026 04:20
@yf225 yf225 marked this pull request as ready for review March 17, 2026 04:20
(e.g. when a compiled function invokes multiple Helion kernels), each
layer passes config_patches through to the next without crashing.
"""
if os.environ.get("_WIP_DEV_ONLY_HELION_TORCH_COMPILE_FUSION", "0") != "1":
Copy link
Copy Markdown
Contributor Author

@yf225 yf225 Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This _WIP_DEV_ONLY_HELION_TORCH_COMPILE_FUSION env var already exists and is temporary - after this PR is landed, I plan to remove this env var and switch the Helion + torch.compile integration to use the newly added HOP approach, and then add allow_torch_compile_fusion field to Helion kernel settings to control whether to do prologue/epilogue fusion.

@yf225 yf225 marked this pull request as draft March 17, 2026 04:42
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 17, 2026 04:42
yf225 added a commit that referenced this pull request Mar 17, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 17, 2026 04:42
@yf225 yf225 marked this pull request as ready for review March 17, 2026 04:42
@yf225 yf225 marked this pull request as draft March 17, 2026 04:56
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 17, 2026 04:56
yf225 added a commit that referenced this pull request Mar 17, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 17, 2026 04:56
@yf225 yf225 marked this pull request as ready for review March 17, 2026 04:56
@yf225 yf225 marked this pull request as draft March 17, 2026 04:58
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 17, 2026 04:58
yf225 added a commit that referenced this pull request Mar 17, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 changed the base branch from main to yf225/stack/72 March 17, 2026 04:58
@yf225 yf225 marked this pull request as ready for review March 17, 2026 04:58
@yf225 yf225 requested review from jansel, oulgen and shunting314 March 17, 2026 05:21
yf225 added a commit that referenced this pull request Mar 17, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
yf225 added a commit that referenced this pull request Mar 17, 2026
- Replace unconditional `self.skipTest` with `requires_torch_version("2.11")`
  guard, now that the required PyTorch-side changes have landed
- Update `expected_num_kernels` values across ~60 tests to reflect
  reduced kernel counts from prologue/epilogue fusion
- Un-skip 3 previously disabled tests:
  `test_autotune_no_fusion_final_has_fusion`,
  `test_inductor_output_code_has_helion_generated_triton_kernel`,
  `test_symint_return_from_tensor_shape`

stack-info: PR: #1727, branch: yf225/stack/74
@yf225 yf225 marked this pull request as draft March 19, 2026 19:03
@yf225 yf225 changed the base branch from yf225/stack/72 to main March 19, 2026 19:03
Copy link
Copy Markdown
Contributor

@jansel jansel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to remove the monkey patching when it is not needed. Doesn't seem ideal.

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.

2 participants