Skip to content

Instantly share code, notes, and snippets.

@FrancescAlted
Last active March 15, 2022 08:20
Show Gist options
  • Save FrancescAlted/12c3de18e9e519ee05b2be992ba5ba1b to your computer and use it in GitHub Desktop.
Save FrancescAlted/12c3de18e9e519ee05b2be992ba5ba1b to your computer and use it in GitHub Desktop.
Matmul with ironArray (preparation)
nrows = 100_000 # number of rows in matrix am
ncols = 25000 # number of columns in first matrix
ncols2 = 1000 # number of columns in second matrix
shape = (nrows, ncols, ncols2)
amshape = (shape[0], shape[1])
bmshape = (shape[1], shape[2])
# Obtain optimal chunk and block shapes
mparams = ia.matmul_params(amshape, bmshape, dtype=np.float64)
amchunks, amblocks, bmchunks, bmblocks = mparams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment