Skip to content

Commit 82e6de6

Browse files
committed
Tweak loop order and indexing syntax to get the vectorizer to succeed on the tiled_matmul function.
1 parent 69b5857 commit 82e6de6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/prelude.dx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,11 +2620,11 @@ def tiled_matmul(
26202620
tile(m, m_tile_size) \m_set.
26212621
for_ l_offset:l_set.
26222622
l_ix = inject(to=l, l_offset)
2623-
for_ n_offset:n_set.
2624-
n_ix = inject n_offset
2625-
for_ m_offset:m_set.
2626-
m_ix = inject m_offset
2627-
result!l_ix!n_ix += x[l_ix,m_ix] * y[m_ix,n_ix]
2623+
for_ m_offset:m_set.
2624+
m_ix = inject m_offset
2625+
for_ n_offset:n_set.
2626+
n_ix = inject n_offset
2627+
result!l_ix!n_ix += x[l_ix][m_ix] * y[m_ix][n_ix]
26282628

26292629
-- matmul. Better symbol to use? `@`?
26302630
def (**)(

0 commit comments

Comments
 (0)