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

[CustomOp] support non-2D inputs for XnorPopcountMatMul

parent 10756cd8
No related branches found
No related tags found
No related merge requests found
......@@ -37,8 +37,10 @@ def xnorpopcountmatmul(inp0, inp1):
"""Simulates XNOR-popcount matrix multiplication as a regular bipolar
matrix multiplication followed by some post processing."""
# extract the operand shapes
(M, K0) = inp0.shape
(K1, N) = inp1.shape
# (M, K0) = inp0.shape
# (K1, N) = inp1.shape
K0 = inp0.shape[-1]
K1 = inp1.shape[0]
# make sure shapes are compatible with matmul
assert K0 == K1, "Matrix shapes are not compatible with matmul."
K = K0
......
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