Rewrite linalg.multiply() to use ElementwiseKernel.