-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
For this kernel
@helion.kernel(use_default_config=True)
def helion_sum(x):
m, n = x.shape
y = torch.empty(m, device=x.device, dtype=x.dtype)
for tile in hl.tile([m]):
y[tile] = x[tile, :].sum(dim=-1)
return y
Helion reports the following error:
File "/home/shunting/ws/helion/helion/_compiler/type_propagation.py", line 481, in _device_indexing_size
raise exc.OverpackedTile(k)
helion.exc.OverpackedTile: Got a tile wrapped inside a container when indexing a tensor: SequenceType((TileIndexType(0), ))
Did you mix up `hl.tile([x])` and `hl.tile(x)`?
While processing:
File "/home/shunting/gws/tutor/helion/sum.py", line 11, in helion_sum
y[tile] = x[tile, :].sum(dim=-1)
^^^^^^^^^^
The error message is clear about how to fix. But it's not clear why hl.tile
should not talke [m]
as argument while a tensor.shape is a valid input in 2D case.
Metadata
Metadata
Assignees
Labels
No labels