Implement a custom matmul function that matches the reference implementation.
The function should handle a tuple of input tensors and apply matmul
The shapes of all outer and inner dimensions of tensors are multiples of 16
