Skip to content
Snippets Groups Projects
Commit 75eaa250 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Test] add test_interleave_matrix_outer_dim_from_partitions

parent 8e8d19e9
No related branches found
No related tags found
No related merge requests found
import numpy as np
import finn.core.utils as util
def test_interleave_matrix_outer_dim_from_partitions():
A = np.eye(10)
n_parts = 2
Ax = util.interleave_matrix_outer_dim_from_partitions(A, n_parts)
part_size = 10 // n_parts
assert Ax.shape == (n_parts, part_size, 10)
for r_ind in range(A.shape[0]):
assert (A[r_ind] == Ax[r_ind % n_parts][r_ind // n_parts]).all()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment