Skip to content

Commit 51580b4

Browse files
authored
Remove @helion.jit usage and advise use of @helion.kernel (#1116)
1 parent b5430fe commit 51580b4

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

examples/all_gather_matmul.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def copy_engine_all_gather_w_progress(
7979

8080

8181
# %%
82-
@helion.jit(
82+
@helion.kernel(
8383
config=helion.Config(
8484
block_sizes=[128, 256, 64],
8585
num_warps=8,

examples/all_reduce.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def dev_array_to_tensor_short(
8181

8282

8383
# %%
84-
@helion.jit(
84+
@helion.kernel(
8585
config=helion.Config(
8686
block_sizes=[8192],
8787
num_warps=32,

test/test_associative_scan.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ def cumsum_helper(x: torch.Tensor) -> torch.Tensor:
9292
return hl.associative_scan(add_combine_fn, x, dim=0)
9393

9494

95-
@helion.jit
95+
@helion.kernel
9696
def jit_add_combine_fn(x, y):
97-
"""Addition combine function with @helion.jit decorator (should be ignored)."""
97+
"""Addition combine function with @helion.kernel decorator (should be ignored)."""
9898
return x + y
9999

100100

@@ -496,10 +496,10 @@ def test_codegen_kernel(x: torch.Tensor) -> torch.Tensor:
496496
self.assertNotIn("placeholder", code)
497497

498498
@skipIfRefEager(
499-
"torch._higher_order_ops.associative_scan with nested @helion.jit is not supported by ref eager mode yet"
499+
"torch._higher_order_ops.associative_scan with nested @helion.kernel is not supported by ref eager mode yet"
500500
)
501501
def test_associative_scan_jit_decorator_ignored(self):
502-
"""Test that @helion.jit decorator on combine functions is ignored."""
502+
"""Test that @helion.kernel decorator on combine functions is ignored."""
503503

504504
@helion.kernel(autotune_effort="none")
505505
def test_jit_kernel(x: torch.Tensor) -> torch.Tensor:
@@ -521,8 +521,8 @@ def test_jit_kernel(x: torch.Tensor) -> torch.Tensor:
521521
self.assertIn("def jit_add_combine_fn_", code)
522522
self.assertIn("tl.associative_scan", code)
523523
self.assertIn("param_0 + param_1", code)
524-
# Verify @helion.jit decorator doesn't appear in generated code
525-
self.assertNotIn("@helion.jit", code)
524+
# Verify @helion.kernel decorator doesn't appear in generated code
525+
self.assertNotIn("@helion.kernel", code)
526526

527527
@skipIfRefEager(
528528
"torch._higher_order_ops.associative_scan with tuple arg is not supported by ref eager mode yet"

test/test_reduce.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ def argmax_combine_unpacked_fn(left_value, left_index, right_value, right_index)
7373
return max_value, max_index
7474

7575

76-
@helion.jit
76+
@helion.kernel
7777
def jit_add_combine_fn(x, y):
78-
"""Addition combine function with @helion.jit decorator (should be ignored)."""
78+
"""Addition combine function with @helion.kernel decorator (should be ignored)."""
7979
return x + y
8080

8181

@@ -221,7 +221,7 @@ def test_reduce_product_kernel(x: torch.Tensor) -> torch.Tensor:
221221
torch.testing.assert_close(result, expected)
222222

223223
def test_reduce_jit_combine_fn(self):
224-
"""Test reduce with @helion.jit decorated combine function."""
224+
"""Test reduce with @helion.kernel decorated combine function."""
225225

226226
@helion.kernel(autotune_effort="none")
227227
def test_reduce_jit_kernel(x: torch.Tensor) -> torch.Tensor:

0 commit comments

Comments
 (0)