@@ -515,18 +515,18 @@ def layer_norm_fwd_nonpow2(x: torch.Tensor, weight: torch.Tensor, bias: torch.Te
515515--- assertExpectedJournal(TestReductions.test_mean)
516516def reduce_kernel(x: torch.Tensor, fn: Callable[[torch.Tensor], torch.Tensor], out_dtype=torch.float32):
517517 n, _m =
518- # Call: SequenceType((LiteralType(512), LiteralType(512))) SourceOrigin(location=<SourceLocation test_reductions.py:51 >)
518+ # Call: SequenceType((LiteralType(512), LiteralType(512))) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
519519 # Attribute: TensorAttributeType AttributeOrigin(value=ArgumentOrigin(name='x'), key='size')
520520 # Name: TensorType([512, 512], torch.float32) ArgumentOrigin(name='x')
521521x.size()
522522 out =
523- # Call: TensorType([512], torch.float32) SourceOrigin(location=<SourceLocation test_reductions.py:52 >)
523+ # Call: TensorType([512], torch.float32) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
524524 # Attribute: CallableType(_VariableFunctionsClass.empty) AttributeOrigin(value=GlobalOrigin(name='torch'), key='empty')
525525 # Name: PythonModuleType(torch) GlobalOrigin(name='torch')
526526torch.empty(
527- # List: SequenceType([LiteralType(512)]) SourceOrigin(location=<SourceLocation test_reductions.py:53 >)
527+ # List: SequenceType([LiteralType(512)]) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
528528[
529- # Name: LiteralType(512) GetItemOrigin(value=SourceOrigin(location=<SourceLocation test_reductions.py:51 >), key=0)
529+ # Name: LiteralType(512) GetItemOrigin(value=SourceOrigin(location=<SourceLocation test_reductions.py:N >), key=0)
530530n], dtype=
531531 # Name: LiteralType(torch.float32) ArgumentOrigin(name='out_dtype')
532532out_dtype, device=
@@ -536,38 +536,38 @@ x.device)
536536 # For: loop_type=GRID
537537
538538 for tile_n in
539- # Call: IterType(TileIndexType(0)) SourceOrigin(location=<SourceLocation test_reductions.py:57 >)
539+ # Call: IterType(TileIndexType(0)) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
540540 # Attribute: CallableType(tile) AttributeOrigin(value=GlobalOrigin(name='hl'), key='tile')
541541 # Name: PythonModuleType(helion.language) GlobalOrigin(name='hl')
542542hl.tile(
543- # Name: LiteralType(512) GetItemOrigin(value=SourceOrigin(location=<SourceLocation test_reductions.py:51 >), key=0)
543+ # Name: LiteralType(512) GetItemOrigin(value=SourceOrigin(location=<SourceLocation test_reductions.py:N >), key=0)
544544n):
545545
546- # Subscript: TensorType([block_size_0], torch.float32) DeviceOrigin(location=<SourceLocation test_reductions.py:58 >)
547- # Name: TensorType([512], torch.float32) SourceOrigin(location=<SourceLocation test_reductions.py:52 >)
546+ # Subscript: TensorType([block_size_0], torch.float32) DeviceOrigin(location=<SourceLocation test_reductions.py:N >)
547+ # Name: TensorType([512], torch.float32) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
548548out[
549- # Name: TileIndexType(0) SourceOrigin(location=<SourceLocation test_reductions.py:57 >)
549+ # Name: TileIndexType(0) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
550550tile_n] =
551- # Call: TensorType([block_size_0], torch.float32) DeviceOrigin(location=<SourceLocation test_reductions.py:58 >)
551+ # Call: TensorType([block_size_0], torch.float32) DeviceOrigin(location=<SourceLocation test_reductions.py:N >)
552552 # Name: CallableType(_VariableFunctionsClass.mean) ArgumentOrigin(name='fn')
553553fn(
554- # Subscript: TensorType([block_size_0, rdim_1], torch.float32) DeviceOrigin(location=<SourceLocation test_reductions.py:58 >)
554+ # Subscript: TensorType([block_size_0, rdim_1], torch.float32) DeviceOrigin(location=<SourceLocation test_reductions.py:N >)
555555 # Name: TensorType([512, 512], torch.float32) ArgumentOrigin(name='x')
556556x[
557- # Name: TileIndexType(0) SourceOrigin(location=<SourceLocation test_reductions.py:57 >)
557+ # Name: TileIndexType(0) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
558558tile_n,
559- # Slice: SliceType(LiteralType(None):LiteralType(None):LiteralType(None)) DeviceOrigin(location=<SourceLocation test_reductions.py:58 >)
559+ # Slice: SliceType(LiteralType(None):LiteralType(None):LiteralType(None)) DeviceOrigin(location=<SourceLocation test_reductions.py:N >)
560560:], dim=
561- # UnaryOp: LiteralType(-1) DeviceOrigin(location=<SourceLocation test_reductions.py:58 >)
561+ # UnaryOp: LiteralType(-1) DeviceOrigin(location=<SourceLocation test_reductions.py:N >)
562562-
563- # Constant: LiteralType(1) DeviceOrigin(location=<SourceLocation test_reductions.py:58 >)
563+ # Constant: LiteralType(1) DeviceOrigin(location=<SourceLocation test_reductions.py:N >)
5645641)
565565 return
566- # Name: TensorType([512], torch.float32) SourceOrigin(location=<SourceLocation test_reductions.py:52 >)
566+ # Name: TensorType([512], torch.float32) SourceOrigin(location=<SourceLocation test_reductions.py:N >)
567567out
568568
569569def root_graph_0():
570- # File: .../test_reductions.py:58 in reduce_kernel, code: out[tile_n] = fn(x[tile_n, :], dim=-1)
570+ # File: .../test_reductions.py:N in reduce_kernel, code: out[tile_n] = fn(x[tile_n, :], dim=-1)
571571 x: "f32[512, 512]" = helion_language__tracing_ops__host_tensor('x')
572572 block_size_0: "Sym(u0)" = helion_language__tracing_ops__get_symnode('block_size_0')
573573 load: "f32[u0, u1]" = helion_language_memory_ops_load(x, [block_size_0, slice(None, None, None)], None, None); x = None
@@ -578,15 +578,15 @@ def root_graph_0():
578578 return None
579579
580580def reduction_loop_1():
581- # File: .../test_reductions.py:58 in reduce_kernel, code: out[tile_n] = fn(x[tile_n, :], dim=-1)
581+ # File: .../test_reductions.py:N in reduce_kernel, code: out[tile_n] = fn(x[tile_n, :], dim=-1)
582582 x: "f32[512, 512]" = helion_language__tracing_ops__host_tensor('x')
583583 block_size_0: "Sym(u0)" = helion_language__tracing_ops__get_symnode('block_size_0')
584584 load: "f32[u0, u1]" = helion_language_memory_ops_load(x, [block_size_0, slice(None, None, None)], None, None); x = block_size_0 = None
585585 mean_extra: "f32[u0]" = helion_language__tracing_ops__inductor_lowering_extra([load]); load = None
586586 return [mean_extra]
587587
588588def root_graph_2():
589- # File: .../test_reductions.py:58 in reduce_kernel, code: out[tile_n] = fn(x[tile_n, :], dim=-1)
589+ # File: .../test_reductions.py:N in reduce_kernel, code: out[tile_n] = fn(x[tile_n, :], dim=-1)
590590 block_size_0: "Sym(u0)" = helion_language__tracing_ops__get_symnode('block_size_0')
591591 _get_symnode = helion_language__tracing_ops__get_symnode('rdim1')
592592 _for_loop = helion_language__tracing_ops__for_loop(1, [0], [_get_symnode], []); _get_symnode = None
0 commit comments