Added more code for tensor multiply.